summaryrefslogtreecommitdiffstats
path: root/LayoutTests
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-07-09 16:02:34 +0100
committerSteve Block <steveblock@google.com>2010-07-09 16:02:34 +0100
commit033f36aa7125b327c65c4bc23d694ce5274f8224 (patch)
tree1929025b65c891983e87f281eb99a3c141e0b0a7 /LayoutTests
parent92f452b0082ffac909a4d1d2eac4d015f53edfe4 (diff)
downloadexternal_webkit-033f36aa7125b327c65c4bc23d694ce5274f8224.zip
external_webkit-033f36aa7125b327c65c4bc23d694ce5274f8224.tar.gz
external_webkit-033f36aa7125b327c65c4bc23d694ce5274f8224.tar.bz2
Add dom/xhtml/level1 layout tests at WebKit r62496
These all pass. Change-Id: If26268844fe87cd6ed8d0fc823ecf59b6eab1938
Diffstat (limited to 'LayoutTests')
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd.js110
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd.xhtml10
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.js143
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.js140
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.js143
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.js140
-rw-r--r--LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1.js132
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2.js127
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3.js138
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4.js152
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5.js141
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6.js127
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1.js132
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment.js138
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode.js127
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2.js127
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue.js118
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild.js127
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2.js146
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes.js114
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1.js140
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2.js141
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3.js146
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4.js147
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5.js153
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6.js142
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7.js160
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrlastchild-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrlastchild.js127
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrlastchild.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrname-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrname.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrname.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull.js118
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrnormalize-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrnormalize.js133
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrnormalize.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull.js118
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull.js118
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1.js135
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2.js141
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1.js135
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2.js138
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue.js121
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength.js125
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata.js132
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength.js119
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative.js129
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue.js120
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue.js119
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment.js144
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment.js120
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement.js121
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive.js132
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode.js120
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype.js149
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength.js110
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength.js221
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue.js120
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull.js129
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml.js125
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute.js119
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue.js119
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode.js114
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull.js115
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname.js112
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist.js144
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch.js110
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue.js134
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgettagname-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgettagname.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementgettagname.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception.js125
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1.js119
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementnormalize-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementnormalize.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementnormalize.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2.js129
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute.js113
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode.js119
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes.js144
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue.js113
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname.js118
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull.js120
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr.js147
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1.js133
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1.js144
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange.js141
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem.js121
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr.js139
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes.js127
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem.js150
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem.js152
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull.js121
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue.js132
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists.js134
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr.js149
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists.js160
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment.js158
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument.js144
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor.js132
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute.js120
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename.js115
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue.js118
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes.js149
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild.js159
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied.js149
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue.js145
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext.js121
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes.js135
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename.js134
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype.js133
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue.js133
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename.js114
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype.js114
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue.js120
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute.js111
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename.js111
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype.js110
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue.js112
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes.js145
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename.js125
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype.js112
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue.js109
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull.js118
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument.js129
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull.js115
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes.js113
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore.js153
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment.js141
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype.js136
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument.js147
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists.js151
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor.js135
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent.js133
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero.js135
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength.js129
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero.js133
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem.js129
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem.js133
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist.js149
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode.js117
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull.js114
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechild-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechild.js133
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechild.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename.js128
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode.js160
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent.js129
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild.js127
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype.js136
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument.js147
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists.js155
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor.js135
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute.js118
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename.js113
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue.js118
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue01-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue01.js114
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue01.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue02-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue02.js114
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue02.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue03-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue03.js138
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue03.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue04-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue04.js132
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue04.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue05-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue05.js114
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue05.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue06-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue06.js112
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue06.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue07-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue07.js134
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue07.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue08-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue08.js134
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_nodevalue08.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1.js133
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1-expected.txt3
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1.js144
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset.js130
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds.js131
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements.js169
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittextone-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittextone.js126
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittextone.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree.js124
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo.js123
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup-expected.txt2
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup.js122
-rw-r--r--LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup.xhtml60
-rw-r--r--LayoutTests/dom/xhtml/level1/core/resources/COPYRIGHT.xhtml102
-rw-r--r--LayoutTests/dom/xhtml/level1/core/selfxhtml.js743
-rw-r--r--LayoutTests/dom/xhtml/level1/core/staff.dtd17
-rw-r--r--LayoutTests/dom/xhtml/level1/core/xhtml-lat1.ent196
-rw-r--r--LayoutTests/dom/xhtml/level1/core/xhtml-special.ent80
-rw-r--r--LayoutTests/dom/xhtml/level1/core/xhtml-symbol.ent237
-rw-r--r--LayoutTests/dom/xhtml/level1/core/xhtml1-frameset.dtd1235
-rw-r--r--LayoutTests/dom/xhtml/level1/core/xhtml1-strict.dtd978
-rw-r--r--LayoutTests/dom/xhtml/level1/core/xhtml1-transitional.dtd1201
723 files changed, 50184 insertions, 0 deletions
diff --git a/LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd-expected.txt b/LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd-expected.txt
new file mode 100644
index 0000000..a5c829e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentgetdoctypenodtd
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd.js b/LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd.js
new file mode 100644
index 0000000..7d475f9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd.js
@@ -0,0 +1,110 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentgetdoctypenodtd";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("validating", false);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_nodtdstaff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getDoctype()" method returns null for XML documents
+ without a document type declaration.
+ Retrieve the XML document without a DTD and invoke the
+ "getDoctype()" method. It should return null.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A31
+*/
+function documentgetdoctypenodtd() {
+ var success;
+ if(checkInitialization(builder, "documentgetdoctypenodtd") != null) return;
+ var doc;
+ var docType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_nodtdstaff");
+ docType = doc.doctype;
+
+ assertNull("documentGetDocTypeNoDTDAssert",docType);
+
+}
+
+
+
+
+function runTest() {
+ documentgetdoctypenodtd();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd.xhtml b/LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd.xhtml
new file mode 100644
index 0000000..1a6bc84
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentgetdoctypenodtd.xhtml
@@ -0,0 +1,10 @@
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>hc_nodtdstaff</title><script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentgetdoctypenodtd.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref-expected.txt b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref-expected.txt
new file mode 100644
index 0000000..d2d6d17
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreateentref
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.js b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.js
new file mode 100644
index 0000000..ce7e127
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.js
@@ -0,0 +1,143 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreateentref";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "createEntityReference(tagName)" method raises an
+ INVALID_CHARACTER_ERR DOMException if the specified
+ tagName contains an invalid character.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-392B75AE
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-392B75AE')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function documentinvalidcharacterexceptioncreateentref() {
+ var success;
+ if(checkInitialization(builder, "documentinvalidcharacterexceptioncreateentref") != null) return;
+ var doc;
+ var badEntityRef;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+
+ {
+ success = false;
+ try {
+ badEntityRef = doc.createEntityReference("foo");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ badEntityRef = doc.createEntityReference("invalid^Name");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentinvalidcharacterexceptioncreateentref();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.xhtml b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.xhtml
new file mode 100644
index 0000000..d810983
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentinvalidcharacterexceptioncreateentref.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1-expected.txt b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1-expected.txt
new file mode 100644
index 0000000..df3bc99
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreateentref1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.js b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.js
new file mode 100644
index 0000000..b4d1ec9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.js
@@ -0,0 +1,140 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreateentref1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Creating an entity reference with an empty name should cause an INVALID_CHARACTER_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-392B75AE
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-392B75AE')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=525
+*/
+function documentinvalidcharacterexceptioncreateentref1() {
+ var success;
+ if(checkInitialization(builder, "documentinvalidcharacterexceptioncreateentref1") != null) return;
+ var doc;
+ var badEntityRef;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+
+ {
+ success = false;
+ try {
+ badEntityRef = doc.createEntityReference("foo");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ badEntityRef = doc.createEntityReference("");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentinvalidcharacterexceptioncreateentref1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.xhtml b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.xhtml
new file mode 100644
index 0000000..f83bab9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentinvalidcharacterexceptioncreateentref1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi-expected.txt b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi-expected.txt
new file mode 100644
index 0000000..749db25
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreatepi
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.js b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.js
new file mode 100644
index 0000000..3216c53
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.js
@@ -0,0 +1,143 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreatepi";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "createProcessingInstruction(target,data) method
+ raises an INVALID_CHARACTER_ERR DOMException if the
+ specified tagName contains an invalid character.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-135944439
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-135944439')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function documentinvalidcharacterexceptioncreatepi() {
+ var success;
+ if(checkInitialization(builder, "documentinvalidcharacterexceptioncreatepi") != null) return;
+ var doc;
+ var badPI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+
+ {
+ success = false;
+ try {
+ badPI = doc.createProcessingInstruction("foo","data");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ badPI = doc.createProcessingInstruction("invalid^Name","data");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentinvalidcharacterexceptioncreatepi();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.xhtml b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.xhtml
new file mode 100644
index 0000000..3c077c0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentinvalidcharacterexceptioncreatepi.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1-expected.txt b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1-expected.txt
new file mode 100644
index 0000000..5c3721e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreatepi1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.js b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.js
new file mode 100644
index 0000000..fb6104d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.js
@@ -0,0 +1,140 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreatepi1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Creating a processing instruction with an empty target should cause an INVALID_CHARACTER_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-135944439
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-135944439')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=525
+*/
+function documentinvalidcharacterexceptioncreatepi1() {
+ var success;
+ if(checkInitialization(builder, "documentinvalidcharacterexceptioncreatepi1") != null) return;
+ var doc;
+ var badPI;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+
+ {
+ success = false;
+ try {
+ badPI = doc.createProcessingInstruction("foo","data");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+ else {
+
+ {
+ success = false;
+ try {
+ badPI = doc.createProcessingInstruction("","data");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ documentinvalidcharacterexceptioncreatepi1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.xhtml b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.xhtml
new file mode 100644
index 0000000..0542c81
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentinvalidcharacterexceptioncreatepi1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1-expected.txt
new file mode 100644
index 0000000..0583b5e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1.js b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1.js
new file mode 100644
index 0000000..0bb0ad9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Appends a text node to an attribute and checks if the value of
+the attribute is changed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+*/
+function hc_attrappendchild1() {
+ var success;
+ if(checkInitialization(builder, "hc_attrappendchild1") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var lastChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = doc.createTextNode("terday");
+ retval = titleAttr.appendChild(textNode);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","Yesterday",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","Yesterday",value);
+ value = retval.nodeValue;
+
+ assertEquals("retvalValue","terday",value);
+ lastChild = titleAttr.lastChild;
+
+ value = lastChild.nodeValue;
+
+ assertEquals("lastChildValue","terday",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrappendchild1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1.xhtml
new file mode 100644
index 0000000..429b928
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrappendchild1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2-expected.txt
new file mode 100644
index 0000000..dc46570
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild2
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2.js b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2.js
new file mode 100644
index 0000000..ac53896
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attempts to append an element to the child nodes of an attribute.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+*/
+function hc_attrappendchild2() {
+ var success;
+ if(checkInitialization(builder, "hc_attrappendchild2") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var newChild;
+ var retval;
+ var lastChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ newChild = doc.createElement("terday");
+
+ {
+ success = false;
+ try {
+ retval = titleAttr.appendChild(newChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_attrappendchild2();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2.xhtml
new file mode 100644
index 0000000..10b17e7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild2.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrappendchild2.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3-expected.txt
new file mode 100644
index 0000000..de2a65a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild3
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3.js b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3.js
new file mode 100644
index 0000000..66adc3d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild3";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Appends a document fragment to an attribute and checks if the value of
+the attribute is changed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+*/
+function hc_attrappendchild3() {
+ var success;
+ if(checkInitialization(builder, "hc_attrappendchild3") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var terNode;
+ var dayNode;
+ var retval;
+ var lastChild;
+ var docFrag;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ terNode = doc.createTextNode("ter");
+ dayNode = doc.createTextNode("day");
+ docFrag = doc.createDocumentFragment();
+ retval = docFrag.appendChild(terNode);
+ retval = docFrag.appendChild(dayNode);
+ retval = titleAttr.appendChild(docFrag);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","Yesterday",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","Yesterday",value);
+ value = retval.nodeValue;
+
+ assertNull("retvalValue",value);
+ lastChild = titleAttr.lastChild;
+
+ value = lastChild.nodeValue;
+
+ assertEquals("lastChildValue","day",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrappendchild3();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3.xhtml
new file mode 100644
index 0000000..9901398
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild3.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrappendchild3.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4-expected.txt
new file mode 100644
index 0000000..04ba30c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild4
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4.js b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4.js
new file mode 100644
index 0000000..dc70102
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4.js
@@ -0,0 +1,152 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild4";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attempt to append a CDATASection to an attribute which should result
+in a HIERARCHY_REQUEST_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+*/
+function hc_attrappendchild4() {
+ var success;
+ if(checkInitialization(builder, "hc_attrappendchild4") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var lastChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+
+ {
+ success = false;
+ try {
+ textNode = doc.createCDATASection("terday");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+ else {
+ textNode = doc.createCDATASection("terday");
+
+ {
+ success = false;
+ try {
+ retval = titleAttr.appendChild(textNode);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_attrappendchild4();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4.xhtml
new file mode 100644
index 0000000..e8659a4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild4.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrappendchild4.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5-expected.txt
new file mode 100644
index 0000000..60f2a64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild5
+Status failure
+Message throw_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5.js b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5.js
new file mode 100644
index 0000000..c9e8855
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild5";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var otherDocRef = null;
+ if (typeof(this.otherDoc) != 'undefined') {
+ otherDocRef = this.otherDoc;
+ }
+ docsLoaded += preload(otherDocRef, "otherDoc", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attempt to append a node from another document to an attribute which should result
+in a WRONG_DOCUMENT_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+*/
+function hc_attrappendchild5() {
+ var success;
+ if(checkInitialization(builder, "hc_attrappendchild5") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var lastChild;
+ var otherDoc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ var otherDocRef = null;
+ if (typeof(this.otherDoc) != 'undefined') {
+ otherDocRef = this.otherDoc;
+ }
+ otherDoc = load(otherDocRef, "otherDoc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = otherDoc.createTextNode("terday");
+
+ {
+ success = false;
+ try {
+ retval = titleAttr.appendChild(textNode);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_attrappendchild5();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5.xhtml
new file mode 100644
index 0000000..6227713
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild5.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrappendchild5.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6-expected.txt
new file mode 100644
index 0000000..a1a17e4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild6
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6.js b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6.js
new file mode 100644
index 0000000..01b3d80
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild6";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Creates an new attribute node and appends a text node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+*/
+function hc_attrappendchild6() {
+ var success;
+ if(checkInitialization(builder, "hc_attrappendchild6") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var lastChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ titleAttr = doc.createAttribute("title");
+ textNode = doc.createTextNode("Yesterday");
+ retval = titleAttr.appendChild(textNode);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","Yesterday",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","Yesterday",value);
+ value = retval.nodeValue;
+
+ assertEquals("retvalValue","Yesterday",value);
+ lastChild = titleAttr.lastChild;
+
+ value = lastChild.nodeValue;
+
+ assertEquals("lastChildValue","Yesterday",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrappendchild6();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6.xhtml
new file mode 100644
index 0000000..e42ab84
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrappendchild6.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrappendchild6.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1-expected.txt
new file mode 100644
index 0000000..eee7614
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrchildnodes1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1.js b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1.js
new file mode 100644
index 0000000..ac088f4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrchildnodes1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that Node.childNodes for an attribute node contains
+the expected text node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1451460987
+*/
+function hc_attrchildnodes1() {
+ var success;
+ if(checkInitialization(builder, "hc_attrchildnodes1") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var childNodes;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ childNodes = titleAttr.childNodes;
+
+ assertSize("childNodesSize",1,childNodes);
+textNode = childNodes.item(0);
+ value = textNode.nodeValue;
+
+ assertEquals("child1IsYes","Yes",value);
+ textNode = childNodes.item(1);
+ assertNull("secondItemIsNull",textNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrchildnodes1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1.xhtml
new file mode 100644
index 0000000..3f552e6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrchildnodes1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2-expected.txt
new file mode 100644
index 0000000..78b5622
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrchildnodes2
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2.js b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2.js
new file mode 100644
index 0000000..c6c6cd5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrchildnodes2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks Node.childNodes for an attribute with multiple child nodes.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1451460987
+*/
+function hc_attrchildnodes2() {
+ var success;
+ if(checkInitialization(builder, "hc_attrchildnodes2") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var childNodes;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ childNodes = titleAttr.childNodes;
+
+ textNode = doc.createTextNode("terday");
+ retval = titleAttr.appendChild(textNode);
+ assertSize("childNodesSize",2,childNodes);
+textNode = childNodes.item(0);
+ value = textNode.nodeValue;
+
+ assertEquals("child1IsYes","Yes",value);
+ textNode = childNodes.item(1);
+ value = textNode.nodeValue;
+
+ assertEquals("child2IsTerday","terday",value);
+ textNode = childNodes.item(2);
+ assertNull("thirdItemIsNull",textNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrchildnodes2();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2.xhtml
new file mode 100644
index 0000000..b46083b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrchildnodes2.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrchildnodes2.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1-expected.txt
new file mode 100644
index 0000000..13dc167
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrclonenode1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1.js b/LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1.js
new file mode 100644
index 0000000..7667e85
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrclonenode1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Appends a text node to an attribute and clones the node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3A0ED0A4
+*/
+function hc_attrclonenode1() {
+ var success;
+ if(checkInitialization(builder, "hc_attrclonenode1") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var lastChild;
+ var clonedTitle;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = doc.createTextNode("terday");
+ retval = titleAttr.appendChild(textNode);
+ clonedTitle = titleAttr.cloneNode(false);
+ textNode.nodeValue = "text_node_not_cloned";
+
+ value = clonedTitle.value;
+
+ assertEquals("attrValue","Yesterday",value);
+ value = clonedTitle.nodeValue;
+
+ assertEquals("attrNodeValue","Yesterday",value);
+ lastChild = clonedTitle.lastChild;
+
+ value = lastChild.nodeValue;
+
+ assertEquals("lastChildValue","terday",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrclonenode1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1.xhtml
new file mode 100644
index 0000000..b068421
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrclonenode1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrclonenode1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment-expected.txt
new file mode 100644
index 0000000..f0fd014
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrcreatedocumentfragment
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment.js b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment.js
new file mode 100644
index 0000000..b35e00f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrcreatedocumentfragment";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Create a new DocumentFragment and add a newly created Element node(with one attribute).
+ Once the element is added, its attribute should be available as an attribute associated
+ with an Element within a DocumentFragment.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-35CB04B5
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A3
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=184
+*/
+function hc_attrcreatedocumentfragment() {
+ var success;
+ if(checkInitialization(builder, "hc_attrcreatedocumentfragment") != null) return;
+ var doc;
+ var docFragment;
+ var newOne;
+ var domesticNode;
+ var attributes;
+ var attribute;
+ var attrName;
+ var appendedChild;
+ var langAttrCount = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFragment = doc.createDocumentFragment();
+ newOne = doc.createElement("html");
+ newOne.setAttribute("lang","EN");
+ appendedChild = docFragment.appendChild(newOne);
+ domesticNode = docFragment.firstChild;
+
+ attributes = domesticNode.attributes;
+
+ for(var indexN10078 = 0;indexN10078 < attributes.length; indexN10078++) {
+ attribute = attributes.item(indexN10078);
+ attrName = attribute.nodeName;
+
+
+ if(
+ equalsAutoCase("attribute", "lang", attrName)
+ ) {
+ langAttrCount += 1;
+
+ }
+
+ }
+ assertEquals("hasLangAttr",1,langAttrCount);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrcreatedocumentfragment();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment.xhtml
new file mode 100644
index 0000000..efbd914
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatedocumentfragment.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrcreatedocumentfragment.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode-expected.txt
new file mode 100644
index 0000000..2389a83
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrcreatetextnode
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode.js b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode.js
new file mode 100644
index 0000000..0298426
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrcreatetextnode";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setValue()" method for an attribute creates a
+ Text node with the unparsed content of the string.
+ Retrieve the attribute named "class" from the last
+ child of of the fourth employee and assign the "Y&ent1;"
+ string to its value attribute. This value is not yet
+ parsed and therefore should still be the same upon
+ retrieval. This test uses the "getNamedItem(name)" method
+ from the NamedNodeMap interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-221662474
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2002Apr/0057.html
+*/
+function hc_attrcreatetextnode() {
+ var success;
+ if(checkInitialization(builder, "hc_attrcreatetextnode") != null) return;
+ var doc;
+ var addressList;
+ var testNode;
+ var attributes;
+ var streetAttr;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testNode = addressList.item(3);
+ attributes = testNode.attributes;
+
+ streetAttr = attributes.getNamedItem("class");
+ streetAttr.value = "Y&ent1;";
+
+ value = streetAttr.value;
+
+ assertEquals("value","Y&ent1;",value);
+ value = streetAttr.nodeValue;
+
+ assertEquals("nodeValue","Y&ent1;",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrcreatetextnode();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode.xhtml
new file mode 100644
index 0000000..52010a1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrcreatetextnode.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2-expected.txt
new file mode 100644
index 0000000..58c61ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrcreatetextnode2
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2.js b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2.js
new file mode 100644
index 0000000..bfa0d05
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrcreatetextnode2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setNodeValue()" method for an attribute creates a
+ Text node with the unparsed content of the string.
+ Retrieve the attribute named "class" from the last
+ child of of the fourth employee and assign the "Y&ent1;"
+ string to its value attribute. This value is not yet
+ parsed and therefore should still be the same upon
+ retrieval. This test uses the "getNamedItem(name)" method
+ from the NamedNodeMap interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2002Apr/0057.html
+*/
+function hc_attrcreatetextnode2() {
+ var success;
+ if(checkInitialization(builder, "hc_attrcreatetextnode2") != null) return;
+ var doc;
+ var addressList;
+ var testNode;
+ var attributes;
+ var streetAttr;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testNode = addressList.item(3);
+ attributes = testNode.attributes;
+
+ streetAttr = attributes.getNamedItem("class");
+ streetAttr.nodeValue = "Y&ent1;";
+
+ value = streetAttr.value;
+
+ assertEquals("value","Y&ent1;",value);
+ value = streetAttr.nodeValue;
+
+ assertEquals("nodeValue","Y&ent1;",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrcreatetextnode2();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2.xhtml
new file mode 100644
index 0000000..f87c341
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrcreatetextnode2.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrcreatetextnode2.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue-expected.txt
new file mode 100644
index 0000000..89e4f88
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attreffectivevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue.js
new file mode 100644
index 0000000..89a41c0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attreffectivevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If an Attr is explicitly assigned any value, then that value is the attributes effective value.
+ Retrieve the attribute named "domestic" from the last child of of the first employee
+ and examine its nodeValue attribute. This test uses the "getNamedItem(name)" method
+ from the NamedNodeMap interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1074577549
+*/
+function hc_attreffectivevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_attreffectivevalue") != null) return;
+ var doc;
+ var addressList;
+ var testNode;
+ var attributes;
+ var domesticAttr;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testNode = addressList.item(0);
+ attributes = testNode.attributes;
+
+ domesticAttr = attributes.getNamedItem("title");
+ value = domesticAttr.nodeValue;
+
+ assertEquals("attrEffectiveValueAssert","Yes",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attreffectivevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue.xhtml
new file mode 100644
index 0000000..1764cf8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attreffectivevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attreffectivevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild-expected.txt
new file mode 100644
index 0000000..ba2ab32
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrfirstchild
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild.js b/LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild.js
new file mode 100644
index 0000000..68f8b52
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrfirstchild";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that Node.firstChild for an attribute node contains
+the expected text node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-169727388
+*/
+function hc_attrfirstchild() {
+ var success;
+ if(checkInitialization(builder, "hc_attrfirstchild") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var otherChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = titleAttr.firstChild;
+
+ assertNotNull("textNodeNotNull",textNode);
+value = textNode.nodeValue;
+
+ assertEquals("child1IsYes","Yes",value);
+ otherChild = textNode.nextSibling;
+
+ assertNull("nextSiblingIsNull",otherChild);
+ otherChild = textNode.previousSibling;
+
+ assertNull("previousSiblingIsNull",otherChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrfirstchild();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild.xhtml
new file mode 100644
index 0000000..5641a7b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrfirstchild.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrfirstchild.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1-expected.txt
new file mode 100644
index 0000000..2df7e21
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrgetvalue1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1.js b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1.js
new file mode 100644
index 0000000..9ee328c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrgetvalue1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks the value of an attribute that contains entity references.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-221662474
+*/
+function hc_attrgetvalue1() {
+ var success;
+ if(checkInitialization(builder, "hc_attrgetvalue1") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var lastChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("class");
+ value = titleAttr.value;
+
+ assertEquals("attrValue1","Yα",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrgetvalue1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1.xhtml
new file mode 100644
index 0000000..100d85e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrgetvalue1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2-expected.txt
new file mode 100644
index 0000000..0f209c3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrgetvalue2
+Status failure
+Message attrValue1: assertEquals failed, actual Yα, expected αYα.
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2.js b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2.js
new file mode 100644
index 0000000..94cc2ae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2.js
@@ -0,0 +1,146 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrgetvalue2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks the value of an attribute that contains entity references.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-221662474
+*/
+function hc_attrgetvalue2() {
+ var success;
+ if(checkInitialization(builder, "hc_attrgetvalue2") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var firstChild;
+ var alphaRef;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("class");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+
+ {
+ success = false;
+ try {
+ alphaRef = doc.createEntityReference("alpha");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+ else {
+ alphaRef = doc.createEntityReference("alpha");
+ firstChild = titleAttr.firstChild;
+
+ retval = titleAttr.insertBefore(alphaRef,firstChild);
+ value = titleAttr.value;
+
+ assertEquals("attrValue1","αYα",value);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_attrgetvalue2();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2.xhtml
new file mode 100644
index 0000000..0a2e401
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrgetvalue2.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrgetvalue2.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes-expected.txt
new file mode 100644
index 0000000..333e073
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrhaschildnodes
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes.js b/LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes.js
new file mode 100644
index 0000000..71487c3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrhaschildnodes";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that Node.hasChildNodes() is true for an attribute with content.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-810594187
+*/
+function hc_attrhaschildnodes() {
+ var success;
+ if(checkInitialization(builder, "hc_attrhaschildnodes") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var hasChildNodes;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ hasChildNodes = titleAttr.hasChildNodes();
+ assertTrue("hasChildrenIsTrue",hasChildNodes);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrhaschildnodes();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes.xhtml
new file mode 100644
index 0000000..c3fd476
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrhaschildnodes.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrhaschildnodes.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1-expected.txt
new file mode 100644
index 0000000..0a5c047
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1.js b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1.js
new file mode 100644
index 0000000..89aa99e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1.js
@@ -0,0 +1,140 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Appends a text node to an attribute and checks if the value of
+the attribute is changed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+*/
+function hc_attrinsertbefore1() {
+ var success;
+ if(checkInitialization(builder, "hc_attrinsertbefore1") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var firstChild;
+ var lastChild;
+ var refChild = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = doc.createTextNode("terday");
+ retval = titleAttr.insertBefore(textNode,refChild);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","Yesterday",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","Yesterday",value);
+ value = retval.nodeValue;
+
+ assertEquals("retvalValue","terday",value);
+ firstChild = titleAttr.firstChild;
+
+ value = firstChild.nodeValue;
+
+ assertEquals("firstChildValue","Yes",value);
+ lastChild = titleAttr.lastChild;
+
+ value = lastChild.nodeValue;
+
+ assertEquals("lastChildValue","terday",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrinsertbefore1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1.xhtml
new file mode 100644
index 0000000..6bb5fa8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrinsertbefore1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2-expected.txt
new file mode 100644
index 0000000..85cb9bc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore2
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2.js b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2.js
new file mode 100644
index 0000000..cc4f50e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Prepends a text node to an attribute and checks if the value of
+the attribute is changed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+*/
+function hc_attrinsertbefore2() {
+ var success;
+ if(checkInitialization(builder, "hc_attrinsertbefore2") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var lastChild;
+ var firstChild;
+ var refChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = doc.createTextNode("terday");
+ refChild = titleAttr.firstChild;
+
+ retval = titleAttr.insertBefore(textNode,refChild);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","terdayYes",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","terdayYes",value);
+ value = retval.nodeValue;
+
+ assertEquals("retvalValue","terday",value);
+ firstChild = titleAttr.firstChild;
+
+ value = firstChild.nodeValue;
+
+ assertEquals("firstChildValue","terday",value);
+ lastChild = titleAttr.lastChild;
+
+ value = lastChild.nodeValue;
+
+ assertEquals("lastChildValue","Yes",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrinsertbefore2();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2.xhtml
new file mode 100644
index 0000000..f41e5e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore2.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrinsertbefore2.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3-expected.txt
new file mode 100644
index 0000000..033bb8d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore3
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3.js b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3.js
new file mode 100644
index 0000000..3cb24cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3.js
@@ -0,0 +1,146 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore3";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Appends a document fragment to an attribute and checks if the value of
+the attribute is changed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+*/
+function hc_attrinsertbefore3() {
+ var success;
+ if(checkInitialization(builder, "hc_attrinsertbefore3") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var terNode;
+ var dayNode;
+ var docFrag;
+ var retval;
+ var firstChild;
+ var lastChild;
+ var refChild = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ terNode = doc.createTextNode("ter");
+ dayNode = doc.createTextNode("day");
+ docFrag = doc.createDocumentFragment();
+ retval = docFrag.appendChild(terNode);
+ retval = docFrag.appendChild(dayNode);
+ retval = titleAttr.insertBefore(docFrag,refChild);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","Yesterday",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","Yesterday",value);
+ value = retval.nodeValue;
+
+ assertNull("retvalValue",value);
+ firstChild = titleAttr.firstChild;
+
+ value = firstChild.nodeValue;
+
+ assertEquals("firstChildValue","Yes",value);
+ lastChild = titleAttr.lastChild;
+
+ value = lastChild.nodeValue;
+
+ assertEquals("lastChildValue","day",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrinsertbefore3();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3.xhtml
new file mode 100644
index 0000000..c579945
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore3.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrinsertbefore3.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4-expected.txt
new file mode 100644
index 0000000..7d417a4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore4
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4.js b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4.js
new file mode 100644
index 0000000..700e61d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4.js
@@ -0,0 +1,147 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore4";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Prepends a document fragment to an attribute and checks if the value of
+the attribute is changed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+*/
+function hc_attrinsertbefore4() {
+ var success;
+ if(checkInitialization(builder, "hc_attrinsertbefore4") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var terNode;
+ var dayNode;
+ var docFrag;
+ var retval;
+ var firstChild;
+ var lastChild;
+ var refChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ terNode = doc.createTextNode("ter");
+ dayNode = doc.createTextNode("day");
+ docFrag = doc.createDocumentFragment();
+ retval = docFrag.appendChild(terNode);
+ retval = docFrag.appendChild(dayNode);
+ refChild = titleAttr.firstChild;
+
+ retval = titleAttr.insertBefore(docFrag,refChild);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","terdayYes",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","terdayYes",value);
+ value = retval.nodeValue;
+
+ assertNull("retvalValue",value);
+ firstChild = titleAttr.firstChild;
+
+ value = firstChild.nodeValue;
+
+ assertEquals("firstChildValue","ter",value);
+ lastChild = titleAttr.lastChild;
+
+ value = lastChild.nodeValue;
+
+ assertEquals("lastChildValue","Yes",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrinsertbefore4();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4.xhtml
new file mode 100644
index 0000000..b493050
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore4.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrinsertbefore4.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5-expected.txt
new file mode 100644
index 0000000..5272e63
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore5
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5.js b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5.js
new file mode 100644
index 0000000..a9737ed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5.js
@@ -0,0 +1,153 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore5";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attempt to append a CDATASection to an attribute which should result
+in a HIERARCHY_REQUEST_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+*/
+function hc_attrinsertbefore5() {
+ var success;
+ if(checkInitialization(builder, "hc_attrinsertbefore5") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var refChild = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+
+ {
+ success = false;
+ try {
+ textNode = doc.createCDATASection("terday");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+ else {
+ textNode = doc.createCDATASection("terday");
+
+ {
+ success = false;
+ try {
+ retval = titleAttr.insertBefore(textNode,refChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_attrinsertbefore5();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5.xhtml
new file mode 100644
index 0000000..eb2ada3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore5.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrinsertbefore5.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6-expected.txt
new file mode 100644
index 0000000..55101a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore6
+Status failure
+Message throw_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6.js b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6.js
new file mode 100644
index 0000000..dc04f62
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6.js
@@ -0,0 +1,142 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore6";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ var otherDocRef = null;
+ if (typeof(this.otherDoc) != 'undefined') {
+ otherDocRef = this.otherDoc;
+ }
+ docsLoaded += preload(otherDocRef, "otherDoc", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attempt to append a text node from another document to an attribute which should result
+in a WRONG_DOCUMENT_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+*/
+function hc_attrinsertbefore6() {
+ var success;
+ if(checkInitialization(builder, "hc_attrinsertbefore6") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var refChild = null;
+
+ var otherDoc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ var otherDocRef = null;
+ if (typeof(this.otherDoc) != 'undefined') {
+ otherDocRef = this.otherDoc;
+ }
+ otherDoc = load(otherDocRef, "otherDoc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = otherDoc.createTextNode("terday");
+
+ {
+ success = false;
+ try {
+ retval = titleAttr.insertBefore(textNode,refChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_attrinsertbefore6();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6.xhtml
new file mode 100644
index 0000000..d3dfaed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore6.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrinsertbefore6.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7-expected.txt
new file mode 100644
index 0000000..c169310
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore7
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7.js b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7.js
new file mode 100644
index 0000000..f014502
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7.js
@@ -0,0 +1,160 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore7";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Appends a document fragment containing a CDATASection to an attribute.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+*/
+function hc_attrinsertbefore7() {
+ var success;
+ if(checkInitialization(builder, "hc_attrinsertbefore7") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var terNode;
+ var dayNode;
+ var docFrag;
+ var retval;
+ var firstChild;
+ var lastChild;
+ var refChild = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ terNode = doc.createTextNode("ter");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+
+ {
+ success = false;
+ try {
+ dayNode = doc.createCDATASection("day");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+ else {
+ dayNode = doc.createCDATASection("day");
+ docFrag = doc.createDocumentFragment();
+ retval = docFrag.appendChild(terNode);
+ retval = docFrag.appendChild(dayNode);
+
+ {
+ success = false;
+ try {
+ retval = titleAttr.insertBefore(docFrag,refChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_attrinsertbefore7();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7.xhtml
new file mode 100644
index 0000000..65928c0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrinsertbefore7.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrinsertbefore7.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrlastchild-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrlastchild-expected.txt
new file mode 100644
index 0000000..da41c24
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrlastchild-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrlastchild
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrlastchild.js b/LayoutTests/dom/xhtml/level1/core/hc_attrlastchild.js
new file mode 100644
index 0000000..1df7342
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrlastchild.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrlastchild";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Checks that Node.lastChild for an attribute node contains
+the expected text node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-61AD09FB
+*/
+function hc_attrlastchild() {
+ var success;
+ if(checkInitialization(builder, "hc_attrlastchild") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var otherChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = titleAttr.firstChild;
+
+ assertNotNull("textNodeNotNull",textNode);
+value = textNode.nodeValue;
+
+ assertEquals("child1IsYes","Yes",value);
+ otherChild = textNode.nextSibling;
+
+ assertNull("nextSiblingIsNull",otherChild);
+ otherChild = textNode.previousSibling;
+
+ assertNull("previousSiblingIsNull",otherChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrlastchild();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrlastchild.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrlastchild.xhtml
new file mode 100644
index 0000000..b1d42d8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrlastchild.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrlastchild.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrname-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrname-expected.txt
new file mode 100644
index 0000000..b8ec73a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrname-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrname
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrname.js b/LayoutTests/dom/xhtml/level1/core/hc_attrname.js
new file mode 100644
index 0000000..890fae1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrname.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrname";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the attribute named class from the last
+ child of of the second "p" element and examine its
+ NodeName.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1112119403
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
+*/
+function hc_attrname() {
+ var success;
+ if(checkInitialization(builder, "hc_attrname") != null) return;
+ var doc;
+ var addressList;
+ var testNode;
+ var attributes;
+ var streetAttr;
+ var strong1;
+ var strong2;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testNode = addressList.item(1);
+ attributes = testNode.attributes;
+
+ streetAttr = attributes.getNamedItem("class");
+ strong1 = streetAttr.nodeName;
+
+ strong2 = streetAttr.name;
+
+ assertEqualsAutoCase("attribute", "nodeName","class",strong1);
+ assertEqualsAutoCase("attribute", "name","class",strong2);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrname();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrname.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrname.xhtml
new file mode 100644
index 0000000..47af556
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrname.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrname.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull-expected.txt
new file mode 100644
index 0000000..85c225b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrnextsiblingnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull.js b/LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull.js
new file mode 100644
index 0000000..12fc9f9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrnextsiblingnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getNextSibling()" method for an Attr node should return null.
+Retrieve the attribute named "domestic" from the last child of of the
+first employee and examine its NextSibling node. This test uses the
+"getNamedItem(name)" method from the NamedNodeMap interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6AC54C2F
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+*/
+function hc_attrnextsiblingnull() {
+ var success;
+ if(checkInitialization(builder, "hc_attrnextsiblingnull") != null) return;
+ var doc;
+ var addressList;
+ var testNode;
+ var attributes;
+ var domesticAttr;
+ var s;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testNode = addressList.item(0);
+ attributes = testNode.attributes;
+
+ domesticAttr = attributes.getNamedItem("title");
+ s = domesticAttr.nextSibling;
+
+ assertNull("attrNextSiblingNullAssert",s);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrnextsiblingnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull.xhtml
new file mode 100644
index 0000000..7188643
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrnextsiblingnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrnextsiblingnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrnormalize-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrnormalize-expected.txt
new file mode 100644
index 0000000..7ef85b5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrnormalize-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrnormalize
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrnormalize.js b/LayoutTests/dom/xhtml/level1/core/hc_attrnormalize.js
new file mode 100644
index 0000000..d9f5e29
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrnormalize.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrnormalize";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Appends a text node to an attribute, normalizes the attribute
+and checks for a single child node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-162CF083
+*/
+function hc_attrnormalize() {
+ var success;
+ if(checkInitialization(builder, "hc_attrnormalize") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var firstChild;
+ var secondChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = doc.createTextNode("terday");
+ retval = titleAttr.appendChild(textNode);
+ textNode = doc.createTextNode("");
+ retval = titleAttr.appendChild(textNode);
+ testNode.normalize();
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","Yesterday",value);
+ firstChild = titleAttr.firstChild;
+
+ value = firstChild.nodeValue;
+
+ assertEquals("firstChildValue","Yesterday",value);
+ secondChild = firstChild.nextSibling;
+
+ assertNull("secondChildIsNull",secondChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrnormalize();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrnormalize.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrnormalize.xhtml
new file mode 100644
index 0000000..b88c2d2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrnormalize.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrnormalize.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull-expected.txt
new file mode 100644
index 0000000..d943f82
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrparentnodenull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull.js b/LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull.js
new file mode 100644
index 0000000..3c6a403
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrparentnodenull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getParentNode()" method for an Attr node should return null. Retrieve
+the attribute named "domestic" from the last child of the first employee
+and examine its parentNode attribute. This test also uses the "getNamedItem(name)"
+method from the NamedNodeMap interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1060184317
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+*/
+function hc_attrparentnodenull() {
+ var success;
+ if(checkInitialization(builder, "hc_attrparentnodenull") != null) return;
+ var doc;
+ var addressList;
+ var testNode;
+ var attributes;
+ var domesticAttr;
+ var s;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testNode = addressList.item(0);
+ attributes = testNode.attributes;
+
+ domesticAttr = attributes.getNamedItem("title");
+ s = domesticAttr.parentNode;
+
+ assertNull("attrParentNodeNullAssert",s);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrparentnodenull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull.xhtml
new file mode 100644
index 0000000..ef664a6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrparentnodenull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrparentnodenull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull-expected.txt
new file mode 100644
index 0000000..b2513f7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrprevioussiblingnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull.js b/LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull.js
new file mode 100644
index 0000000..2773718
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrprevioussiblingnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getPreviousSibling()" method for an Attr node should return null.
+Retrieve the attribute named "domestic" from the last child of of the
+first employee and examine its PreviousSibling node. This test uses the
+"getNamedItem(name)" method from the NamedNodeMap interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-640FB3C8
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+*/
+function hc_attrprevioussiblingnull() {
+ var success;
+ if(checkInitialization(builder, "hc_attrprevioussiblingnull") != null) return;
+ var doc;
+ var addressList;
+ var testNode;
+ var attributes;
+ var domesticAttr;
+ var s;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testNode = addressList.item(0);
+ attributes = testNode.attributes;
+
+ domesticAttr = attributes.getNamedItem("title");
+ s = domesticAttr.previousSibling;
+
+ assertNull("attrPreviousSiblingNullAssert",s);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrprevioussiblingnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull.xhtml
new file mode 100644
index 0000000..9e66565
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrprevioussiblingnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrprevioussiblingnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1-expected.txt
new file mode 100644
index 0000000..7f426f6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrremovechild1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1.js b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1.js
new file mode 100644
index 0000000..5f98746
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrremovechild1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Removes the child node of an attribute and checks that the value is empty.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1734834066
+*/
+function hc_attrremovechild1() {
+ var success;
+ if(checkInitialization(builder, "hc_attrremovechild1") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var firstChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = titleAttr.firstChild;
+
+ assertNotNull("attrChildNotNull",textNode);
+retval = titleAttr.removeChild(textNode);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","",value);
+ value = retval.nodeValue;
+
+ assertEquals("retvalValue","Yes",value);
+ firstChild = titleAttr.firstChild;
+
+ assertNull("firstChildNull",firstChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrremovechild1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1.xhtml
new file mode 100644
index 0000000..aeaafc5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrremovechild1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2-expected.txt
new file mode 100644
index 0000000..1a7d321
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrremovechild2
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2.js b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2.js
new file mode 100644
index 0000000..3e19f4e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrremovechild2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Attempts to remove a freshly created text node which should result in a NOT_FOUND_ERR exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1734834066
+*/
+function hc_attrremovechild2() {
+ var success;
+ if(checkInitialization(builder, "hc_attrremovechild2") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = doc.createTextNode("Yesterday");
+
+ {
+ success = false;
+ try {
+ retval = titleAttr.removeChild(textNode);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_attrremovechild2();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2.xhtml
new file mode 100644
index 0000000..09352c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrremovechild2.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrremovechild2.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1-expected.txt
new file mode 100644
index 0000000..7617bf6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrreplacechild1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1.js b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1.js
new file mode 100644
index 0000000..ff499e5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrreplacechild1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Replaces a text node of an attribute and checks if the value of
+the attribute is changed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+*/
+function hc_attrreplacechild1() {
+ var success;
+ if(checkInitialization(builder, "hc_attrreplacechild1") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var firstChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = doc.createTextNode("terday");
+ firstChild = titleAttr.firstChild;
+
+ assertNotNull("attrChildNotNull",firstChild);
+retval = titleAttr.replaceChild(textNode,firstChild);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","terday",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","terday",value);
+ value = retval.nodeValue;
+
+ assertEquals("retvalValue","Yes",value);
+ firstChild = titleAttr.firstChild;
+
+ value = firstChild.nodeValue;
+
+ assertEquals("firstChildValue","terday",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrreplacechild1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1.xhtml
new file mode 100644
index 0000000..86b5a88
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrreplacechild1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2-expected.txt
new file mode 100644
index 0000000..ecfae55
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrreplacechild2
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2.js b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2.js
new file mode 100644
index 0000000..c26d316
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrreplacechild2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Replaces a text node of an attribute with a document fragment and checks if the value of
+the attribute is changed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+*/
+function hc_attrreplacechild2() {
+ var success;
+ if(checkInitialization(builder, "hc_attrreplacechild2") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var terNode;
+ var dayNode;
+ var docFrag;
+ var retval;
+ var firstChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ terNode = doc.createTextNode("ter");
+ dayNode = doc.createTextNode("day");
+ docFrag = doc.createDocumentFragment();
+ retval = docFrag.appendChild(terNode);
+ retval = docFrag.appendChild(dayNode);
+ firstChild = titleAttr.firstChild;
+
+ assertNotNull("attrChildNotNull",firstChild);
+retval = titleAttr.replaceChild(docFrag,firstChild);
+ value = titleAttr.value;
+
+ assertEquals("attrValue","terday",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","terday",value);
+ value = retval.nodeValue;
+
+ assertEquals("retvalValue","Yes",value);
+ firstChild = titleAttr.firstChild;
+
+ value = firstChild.nodeValue;
+
+ assertEquals("firstChildValue","ter",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrreplacechild2();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2.xhtml
new file mode 100644
index 0000000..62a3424
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrreplacechild2.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrreplacechild2.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1-expected.txt
new file mode 100644
index 0000000..3769b43
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrsetvalue1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1.js b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1.js
new file mode 100644
index 0000000..457f7b6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrsetvalue1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Sets Attr.value on an attribute that only has a simple value.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-221662474
+*/
+function hc_attrsetvalue1() {
+ var success;
+ if(checkInitialization(builder, "hc_attrsetvalue1") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var retval;
+ var firstChild;
+ var otherChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ firstChild = titleAttr.firstChild;
+
+ assertNotNull("attrChildNotNull",firstChild);
+titleAttr.value = "Tomorrow";
+
+ firstChild.nodeValue = "impl reused node";
+
+ value = titleAttr.value;
+
+ assertEquals("attrValue","Tomorrow",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","Tomorrow",value);
+ firstChild = titleAttr.lastChild;
+
+ value = firstChild.nodeValue;
+
+ assertEquals("firstChildValue","Tomorrow",value);
+ otherChild = firstChild.nextSibling;
+
+ assertNull("nextSiblingIsNull",otherChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrsetvalue1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1.xhtml
new file mode 100644
index 0000000..d249ed4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrsetvalue1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2-expected.txt
new file mode 100644
index 0000000..e99f64e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrsetvalue2
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2.js b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2.js
new file mode 100644
index 0000000..029d7d5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrsetvalue2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Sets Attr.value on an attribute that should contain multiple child nodes.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-221662474
+*/
+function hc_attrsetvalue2() {
+ var success;
+ if(checkInitialization(builder, "hc_attrsetvalue2") != null) return;
+ var doc;
+ var acronymList;
+ var testNode;
+ var attributes;
+ var titleAttr;
+ var value;
+ var textNode;
+ var retval;
+ var firstChild;
+ var otherChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ acronymList = doc.getElementsByTagName("acronym");
+ testNode = acronymList.item(3);
+ attributes = testNode.attributes;
+
+ titleAttr = attributes.getNamedItem("title");
+ textNode = doc.createTextNode("terday");
+ retval = titleAttr.appendChild(textNode);
+ firstChild = titleAttr.firstChild;
+
+ assertNotNull("attrChildNotNull",firstChild);
+titleAttr.value = "Tomorrow";
+
+ firstChild.nodeValue = "impl reused node";
+
+ value = titleAttr.value;
+
+ assertEquals("attrValue","Tomorrow",value);
+ value = titleAttr.nodeValue;
+
+ assertEquals("attrNodeValue","Tomorrow",value);
+ firstChild = titleAttr.lastChild;
+
+ value = firstChild.nodeValue;
+
+ assertEquals("firstChildValue","Tomorrow",value);
+ otherChild = firstChild.nextSibling;
+
+ assertNull("nextSiblingIsNull",otherChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrsetvalue2();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2.xhtml
new file mode 100644
index 0000000..badfccd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrsetvalue2.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrsetvalue2.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue-expected.txt
new file mode 100644
index 0000000..56e1cff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrspecifiedvalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue.js b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue.js
new file mode 100644
index 0000000..deb504d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrspecifiedvalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getSpecified()" method for an Attr node should
+ be set to true if the attribute was explicitly given
+ a value.
+ Retrieve the attribute named "domestic" from the last
+ child of of the first employee and examine the value
+ returned by the "getSpecified()" method. This test uses
+ the "getNamedItem(name)" method from the NamedNodeMap
+ interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-862529273
+*/
+function hc_attrspecifiedvalue() {
+ var success;
+ if(checkInitialization(builder, "hc_attrspecifiedvalue") != null) return;
+ var doc;
+ var addressList;
+ var testNode;
+ var attributes;
+ var domesticAttr;
+ var state;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testNode = addressList.item(0);
+ attributes = testNode.attributes;
+
+ domesticAttr = attributes.getNamedItem("title");
+ state = domesticAttr.specified;
+
+ assertTrue("acronymTitleSpecified",state);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrspecifiedvalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue.xhtml
new file mode 100644
index 0000000..e3a1553
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrspecifiedvalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged-expected.txt
new file mode 100644
index 0000000..0d48141
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrspecifiedvaluechanged
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged.js b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged.js
new file mode 100644
index 0000000..fd65931
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrspecifiedvaluechanged";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getSpecified()" method for an Attr node should return true if the
+ value of the attribute is changed.
+ Retrieve the attribute named "class" from the last
+ child of of the THIRD employee and change its
+ value to "Yes"(which is the default DTD value). This
+ should cause the "getSpecified()" method to be true.
+ This test uses the "setAttribute(name,value)" method
+ from the Element interface and the "getNamedItem(name)"
+ method from the NamedNodeMap interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-862529273
+*/
+function hc_attrspecifiedvaluechanged() {
+ var success;
+ if(checkInitialization(builder, "hc_attrspecifiedvaluechanged") != null) return;
+ var doc;
+ var addressList;
+ var testNode;
+ var attributes;
+ var streetAttr;
+ var state;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testNode = addressList.item(2);
+ testNode.setAttribute("class","Yα");
+ attributes = testNode.attributes;
+
+ streetAttr = attributes.getNamedItem("class");
+ state = streetAttr.specified;
+
+ assertTrue("acronymClassSpecified",state);
+
+}
+
+
+
+
+function runTest() {
+ hc_attrspecifiedvaluechanged();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged.xhtml
new file mode 100644
index 0000000..eaf5b1d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_attrspecifiedvaluechanged.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_attrspecifiedvaluechanged.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata-expected.txt
new file mode 100644
index 0000000..e8af24e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataappenddata
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata.js
new file mode 100644
index 0000000..a479174
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataappenddata";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "appendData(arg)" method appends a string to the end
+ of the character data of the node.
+
+ Retrieve the character data from the second child
+ of the first employee. The appendData(arg) method is
+ called with arg=", Esquire". The method should append
+ the specified data to the already existing character
+ data. The new value return by the "getLength()" method
+ should be 24.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-32791A2F
+*/
+function hc_characterdataappenddata() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataappenddata") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childValue;
+ var childLength;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.appendData(", Esquire");
+ childValue = child.data;
+
+ childLength = childValue.length;
+ assertEquals("characterdataAppendDataAssert",24,childLength);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataappenddata();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata.xhtml
new file mode 100644
index 0000000..2a06fe5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddata.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataappenddata.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata-expected.txt
new file mode 100644
index 0000000..ce0ce99
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataappenddatagetdata
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata.js
new file mode 100644
index 0000000..4aed0ce
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataappenddatagetdata";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ On successful invocation of the "appendData(arg)"
+ method the "getData()" method provides access to the
+ concatentation of data and the specified string.
+
+ Retrieve the character data from the second child
+ of the first employee. The appendData(arg) method is
+ called with arg=", Esquire". The method should append
+ the specified data to the already existing character
+ data. The new value return by the "getData()" method
+ should be "Margaret Martin, Esquire".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-32791A2F
+*/
+function hc_characterdataappenddatagetdata() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataappenddatagetdata") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.appendData(", Esquire");
+ childData = child.data;
+
+ assertEquals("characterdataAppendDataGetDataAssert","Margaret Martin, Esquire",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataappenddatagetdata();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata.xhtml
new file mode 100644
index 0000000..da82860
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataappenddatagetdata.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataappenddatagetdata.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining-expected.txt
new file mode 100644
index 0000000..79505d7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedatabegining
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining.js
new file mode 100644
index 0000000..8fc32ed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedatabegining";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "deleteData(offset,count)" method removes a range of
+characters from the node. Delete data at the beginning
+of the character data.
+
+Retrieve the character data from the last child of the
+first employee. The "deleteData(offset,count)"
+method is then called with offset=0 and count=16.
+The method should delete the characters from position
+0 thru position 16. The new value of the character data
+should be "Dallas, Texas 98551".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+*/
+function hc_characterdatadeletedatabegining() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatadeletedatabegining") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.deleteData(0,16);
+ childData = child.data;
+
+ assertEquals("data","Dallas, Texas 98551",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatadeletedatabegining();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining.xhtml
new file mode 100644
index 0000000..a9ccbb1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatabegining.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatadeletedatabegining.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend-expected.txt
new file mode 100644
index 0000000..b2ba444
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedataend
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend.js
new file mode 100644
index 0000000..8d567d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedataend";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "deleteData(offset,count)" method removes a range of
+ characters from the node. Delete data at the end
+ of the character data.
+
+ Retrieve the character data from the last child of the
+ first employee. The "deleteData(offset,count)"
+ method is then called with offset=30 and count=5.
+ The method should delete the characters from position
+ 30 thru position 35. The new value of the character data
+ should be "1230 North Ave. Dallas, Texas".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+*/
+function hc_characterdatadeletedataend() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatadeletedataend") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.deleteData(30,5);
+ childData = child.data;
+
+ assertEquals("characterdataDeleteDataEndAssert","1230 North Ave. Dallas, Texas ",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatadeletedataend();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend.xhtml
new file mode 100644
index 0000000..435872a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataend.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatadeletedataend.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength-expected.txt
new file mode 100644
index 0000000..6c09af0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedataexceedslength
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength.js
new file mode 100644
index 0000000..4dccc5e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedataexceedslength";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the sum of the offset and count used in the
+ "deleteData(offset,count) method is greater than the
+ length of the character data then all the characters
+ from the offset to the end of the data are deleted.
+
+ Retrieve the character data from the last child of the
+ first employee. The "deleteData(offset,count)"
+ method is then called with offset=4 and count=50.
+ The method should delete the characters from position 4
+ to the end of the data since the offset+count(50+4)
+ is greater than the length of the character data(35).
+ The new value of the character data should be "1230".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+*/
+function hc_characterdatadeletedataexceedslength() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatadeletedataexceedslength") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.deleteData(4,50);
+ childData = child.data;
+
+ assertEquals("characterdataDeleteDataExceedsLengthAssert","1230",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatadeletedataexceedslength();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength.xhtml
new file mode 100644
index 0000000..9ab7058
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedataexceedslength.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatadeletedataexceedslength.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata-expected.txt
new file mode 100644
index 0000000..de35a03
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedatagetlengthanddata
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata.js
new file mode 100644
index 0000000..b3784f3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedatagetlengthanddata";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ On successful invocation of the "deleteData(offset,count)"
+ method, the "getData()" and "getLength()" methods reflect
+ the changes.
+
+ Retrieve the character data from the last child of the
+ first employee. The "deleteData(offset,count)"
+ method is then called with offset=30 and count=5.
+ The method should delete the characters from position
+ 30 thru position 35. The new value of the character data
+ should be "1230 North Ave. Dallas, Texas" which is
+ returned by the "getData()" method and "getLength()"
+ method should return 30".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7D61178C
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+*/
+function hc_characterdatadeletedatagetlengthanddata() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatadeletedatagetlengthanddata") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+ var childLength;
+ var result = new Array();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.deleteData(30,5);
+ childData = child.data;
+
+ assertEquals("data","1230 North Ave. Dallas, Texas ",childData);
+ childLength = child.length;
+
+ assertEquals("length",30,childLength);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatadeletedatagetlengthanddata();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata.xhtml
new file mode 100644
index 0000000..61fc858
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatagetlengthanddata.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatadeletedatagetlengthanddata.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle-expected.txt
new file mode 100644
index 0000000..476e39f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedatamiddle
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle.js
new file mode 100644
index 0000000..9afa810
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatadeletedatamiddle";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "deleteData(offset,count)" method removes a range of
+ characters from the node. Delete data in the middle
+ of the character data.
+
+ Retrieve the character data from the last child of the
+ first employee. The "deleteData(offset,count)"
+ method is then called with offset=16 and count=8.
+ The method should delete the characters from position
+ 16 thru position 24. The new value of the character data
+ should be "1230 North Ave. Texas 98551".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+*/
+function hc_characterdatadeletedatamiddle() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatadeletedatamiddle") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.deleteData(16,8);
+ childData = child.data;
+
+ assertEquals("characterdataDeleteDataMiddleAssert","1230 North Ave. Texas 98551",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatadeletedatamiddle();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle.xhtml
new file mode 100644
index 0000000..2df90c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatadeletedatamiddle.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatadeletedatamiddle.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata-expected.txt
new file mode 100644
index 0000000..327b218
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatagetdata
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata.js
new file mode 100644
index 0000000..ef16bb0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatagetdata";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+ The "getData()" method retrieves the character data
+
+ currently stored in the node.
+
+ Retrieve the character data from the second child
+
+ of the first employee and invoke the "getData()"
+
+ method. The method returns the character data
+
+ string.
+
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+*/
+function hc_characterdatagetdata() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatagetdata") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ childData = child.data;
+
+ assertEquals("characterdataGetDataAssert","Margaret Martin",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatagetdata();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata.xhtml
new file mode 100644
index 0000000..77b86aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetdata.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatagetdata.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength-expected.txt
new file mode 100644
index 0000000..5daf261
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatagetlength
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength.js
new file mode 100644
index 0000000..214b14c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatagetlength";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getLength()" method returns the number of characters
+ stored in this nodes data.
+ Retrieve the character data from the second
+ child of the first employee and examine the
+ value returned by the getLength() method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7D61178C
+*/
+function hc_characterdatagetlength() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatagetlength") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childValue;
+ var childLength;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ childValue = child.data;
+
+ childLength = childValue.length;
+ assertEquals("characterdataGetLengthAssert",15,childLength);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatagetlength();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength.xhtml
new file mode 100644
index 0000000..cd3a3b1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatagetlength.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatagetlength.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt
new file mode 100644
index 0000000..7003258
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.js
new file mode 100644
index 0000000..9d03881
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("signed", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "deleteData(offset,count)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified count
+ is negative.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its "deleteData(offset,count)"
+ method with offset=10 and count=-3. It should raise the
+ desired exception since the count is negative.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6531BCCF
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-6531BCCF')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function hc_characterdataindexsizeerrdeletedatacountnegative() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrdeletedatacountnegative") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childSubstring;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ childSubstring = child.substringData(10,-3);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throws_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrdeletedatacountnegative();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.xhtml
new file mode 100644
index 0000000..a78bbc9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrdeletedatacountnegative.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater-expected.txt
new file mode 100644
index 0000000..1c04b82
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater.js
new file mode 100644
index 0000000..a66a6c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "deleteData(offset,count)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset
+ is greater that the number of characters in the string.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its "deleteData(offset,count)"
+ method with offset=40 and count=3. It should raise the
+ desired exception since the offset is greater than the
+ number of characters in the string.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-7C603781')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_characterdataindexsizeerrdeletedataoffsetgreater() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrdeletedataoffsetgreater") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ child.deleteData(40,3);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throw_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrdeletedataoffsetgreater();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater.xhtml
new file mode 100644
index 0000000..3050ff0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetgreater.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrdeletedataoffsetgreater.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative-expected.txt
new file mode 100644
index 0000000..0d83913
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative.js
new file mode 100644
index 0000000..ca26f7d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("signed", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "deleteData(offset,count)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset
+ is negative.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its "deleteData(offset,count)"
+ method with offset=-5 and count=3. It should raise the
+ desired exception since the offset is negative.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-7C603781')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+*/
+function hc_characterdataindexsizeerrdeletedataoffsetnegative() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrdeletedataoffsetnegative") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ child.deleteData(-5,3);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throws_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrdeletedataoffsetnegative();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative.xhtml
new file mode 100644
index 0000000..ba45638
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedataoffsetnegative.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrdeletedataoffsetnegative.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater-expected.txt
new file mode 100644
index 0000000..0891e6e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater.js
new file mode 100644
index 0000000..0abfe7e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertData(offset,arg)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset
+ is greater than the number of characters in the string.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its insertData"(offset,arg)"
+ method with offset=40 and arg="ABC". It should raise
+ the desired exception since the offset is greater than
+ the number of characters in the string.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-7C603781')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_characterdataindexsizeerrinsertdataoffsetgreater() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrinsertdataoffsetgreater") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ child.deleteData(40,3);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throw_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrinsertdataoffsetgreater();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater.xhtml
new file mode 100644
index 0000000..f84b6ad
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetgreater.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrinsertdataoffsetgreater.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative-expected.txt
new file mode 100644
index 0000000..bfb8f9e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative.js
new file mode 100644
index 0000000..4712b94
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("signed", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertData(offset,arg)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset
+ is negative.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its insertData"(offset,arg)"
+ method with offset=-5 and arg="ABC". It should raise
+ the desired exception since the offset is negative.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-E5CBA7FB')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function hc_characterdataindexsizeerrinsertdataoffsetnegative() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrinsertdataoffsetnegative") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ child.replaceData(-5,3,"ABC");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throws_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrinsertdataoffsetnegative();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative.xhtml
new file mode 100644
index 0000000..ba4d491
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrinsertdataoffsetnegative.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrinsertdataoffsetnegative.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt
new file mode 100644
index 0000000..f99ebcc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative.js
new file mode 100644
index 0000000..7a2b7d2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("signed", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceData(offset,count,arg)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified count
+ is negative.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its
+ "replaceData(offset,count,arg) method with offset=10
+ and count=-3 and arg="ABC". It should raise the
+ desired exception since the count is negative.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6531BCCF
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-6531BCCF')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function hc_characterdataindexsizeerrreplacedatacountnegative() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrreplacedatacountnegative") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var badString;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ badString = child.substringData(10,-3);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throws_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrreplacedatacountnegative();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative.xhtml
new file mode 100644
index 0000000..1242a16
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrreplacedatacountnegative.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater-expected.txt
new file mode 100644
index 0000000..62e4f30
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater.js
new file mode 100644
index 0000000..dc62aa7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceData(offset,count,arg)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset
+ is greater than the length of the string.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its
+ "replaceData(offset,count,arg) method with offset=40
+ and count=3 and arg="ABC". It should raise the
+ desired exception since the offset is greater than the
+ length of the string.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-7C603781')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=242
+*/
+function hc_characterdataindexsizeerrreplacedataoffsetgreater() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrreplacedataoffsetgreater") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ child.deleteData(40,3);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throw_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrreplacedataoffsetgreater();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater.xhtml
new file mode 100644
index 0000000..4d43554
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetgreater.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrreplacedataoffsetgreater.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative-expected.txt
new file mode 100644
index 0000000..cfeacf1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative.js
new file mode 100644
index 0000000..af267df
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("signed", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceData(offset,count,arg)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset
+ is negative.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its
+ "replaceData(offset,count,arg) method with offset=-5
+ and count=3 and arg="ABC". It should raise the
+ desired exception since the offset is negative.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-E5CBA7FB')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB
+*/
+function hc_characterdataindexsizeerrreplacedataoffsetnegative() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrreplacedataoffsetnegative") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ child.replaceData(-5,3,"ABC");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throws_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrreplacedataoffsetnegative();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative.xhtml
new file mode 100644
index 0000000..9999a62
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedataoffsetnegative.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrreplacedataoffsetnegative.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt
new file mode 100644
index 0000000..a9205ed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrsubstringcountnegative
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative.js
new file mode 100644
index 0000000..2e96dbe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrsubstringcountnegative";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("signed", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "substringData(offset,count)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified count
+ is negative.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its "substringData(offset,count)
+ method with offset=10 and count=-3. It should raise the
+ desired exception since the count is negative.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6531BCCF
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-6531BCCF')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function hc_characterdataindexsizeerrsubstringcountnegative() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrsubstringcountnegative") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var badSubstring;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ badSubstring = child.substringData(10,-3);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throws_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrsubstringcountnegative();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative.xhtml
new file mode 100644
index 0000000..c58afbe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrsubstringcountnegative.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset-expected.txt
new file mode 100644
index 0000000..010f034
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset.js
new file mode 100644
index 0000000..bc2fbf1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("signed", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "substringData(offset,count)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset
+ is negative.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its "substringData(offset,count)
+ method with offset=-5 and count=3. It should raise the
+ desired exception since the offset is negative.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6531BCCF
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-6531BCCF')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function hc_characterdataindexsizeerrsubstringnegativeoffset() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrsubstringnegativeoffset") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var badString;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ badString = child.substringData(-5,3);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throws_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrsubstringnegativeoffset();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset.xhtml
new file mode 100644
index 0000000..917c13a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringnegativeoffset.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrsubstringnegativeoffset.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater-expected.txt
new file mode 100644
index 0000000..37e83e6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater.js
new file mode 100644
index 0000000..65325c7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "substringData(offset,count)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset
+ is greater than the number of characters in the string.
+
+ Retrieve the character data of the last child of the
+ first employee and invoke its "substringData(offset,count)
+ method with offset=40 and count=3. It should raise the
+ desired exception since the offsets value is greater
+ than the length.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6531BCCF
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-6531BCCF')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_characterdataindexsizeerrsubstringoffsetgreater() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdataindexsizeerrsubstringoffsetgreater") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var badString;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ badString = child.substringData(40,3);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throw_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdataindexsizeerrsubstringoffsetgreater();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater.xhtml
new file mode 100644
index 0000000..ea47268
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringoffsetgreater.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdataindexsizeerrsubstringoffsetgreater.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning-expected.txt
new file mode 100644
index 0000000..bc35698
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatainsertdatabeginning
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning.js
new file mode 100644
index 0000000..576e855
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatainsertdatabeginning";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "insertData(offset,arg)" method will insert a string
+at the specified character offset. Insert the data at
+the beginning of the character data.
+
+Retrieve the character data from the second child of
+the first employee. The "insertData(offset,arg)"
+method is then called with offset=0 and arg="Mss.".
+The method should insert the string "Mss." at position 0.
+The new value of the character data should be
+"Mss. Margaret Martin".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3EDB695F
+*/
+function hc_characterdatainsertdatabeginning() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatainsertdatabeginning") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.insertData(0,"Mss. ");
+ childData = child.data;
+
+ assertEquals("characterdataInsertDataBeginningAssert","Mss. Margaret Martin",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatainsertdatabeginning();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning.xhtml
new file mode 100644
index 0000000..e316535
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatabeginning.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatainsertdatabeginning.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend-expected.txt
new file mode 100644
index 0000000..6606f51
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatainsertdataend
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend.js
new file mode 100644
index 0000000..424f776
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatainsertdataend";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertData(offset,arg)" method will insert a string
+ at the specified character offset. Insert the data at
+ the end of the character data.
+
+ Retrieve the character data from the second child of
+ the first employee. The "insertData(offset,arg)"
+ method is then called with offset=15 and arg=", Esquire".
+ The method should insert the string ", Esquire" at
+ position 15. The new value of the character data should
+ be "Margaret Martin, Esquire".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3EDB695F
+*/
+function hc_characterdatainsertdataend() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatainsertdataend") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.insertData(15,", Esquire");
+ childData = child.data;
+
+ assertEquals("characterdataInsertDataEndAssert","Margaret Martin, Esquire",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatainsertdataend();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend.xhtml
new file mode 100644
index 0000000..e941d77
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdataend.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatainsertdataend.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle-expected.txt
new file mode 100644
index 0000000..6f26e29
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatainsertdatamiddle
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle.js
new file mode 100644
index 0000000..081714c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatainsertdatamiddle";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertData(offset,arg)" method will insert a string
+ at the specified character offset. Insert the data in
+ the middle of the character data.
+
+ Retrieve the character data from the second child of
+ the first employee. The "insertData(offset,arg)"
+ method is then called with offset=9 and arg="Ann".
+ The method should insert the string "Ann" at position 9.
+ The new value of the character data should be
+ "Margaret Ann Martin".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3EDB695F
+*/
+function hc_characterdatainsertdatamiddle() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatainsertdatamiddle") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.insertData(9,"Ann ");
+ childData = child.data;
+
+ assertEquals("characterdataInsertDataMiddleAssert","Margaret Ann Martin",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatainsertdatamiddle();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle.xhtml
new file mode 100644
index 0000000..d7f019b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatainsertdatamiddle.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatainsertdatamiddle.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining-expected.txt
new file mode 100644
index 0000000..93c63ac
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedatabegining
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining.js
new file mode 100644
index 0000000..2f5820d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedatabegining";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "replaceData(offset,count,arg)" method replaces the
+characters starting at the specified offset with the
+specified string. Test for replacement in the
+middle of the data.
+
+Retrieve the character data from the last child of the
+first employee. The "replaceData(offset,count,arg)"
+method is then called with offset=5 and count=5 and
+arg="South". The method should replace characters five
+thru 9 of the character data with "South".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB
+*/
+function hc_characterdatareplacedatabegining() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatareplacedatabegining") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.replaceData(0,4,"2500");
+ childData = child.data;
+
+ assertEquals("characterdataReplaceDataBeginingAssert","2500 North Ave. Dallas, Texas 98551",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatareplacedatabegining();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining.xhtml
new file mode 100644
index 0000000..ba3bbb1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatabegining.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatareplacedatabegining.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend-expected.txt
new file mode 100644
index 0000000..4b306da
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedataend
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend.js
new file mode 100644
index 0000000..8c01d58
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedataend";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceData(offset,count,arg)" method replaces the
+ characters starting at the specified offset with the
+ specified string. Test for replacement at the
+ end of the data.
+
+ Retrieve the character data from the last child of the
+ first employee. The "replaceData(offset,count,arg)"
+ method is then called with offset=30 and count=5 and
+ arg="98665". The method should replace characters 30
+ thru 34 of the character data with "98665".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB
+*/
+function hc_characterdatareplacedataend() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatareplacedataend") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.replaceData(30,5,"98665");
+ childData = child.data;
+
+ assertEquals("characterdataReplaceDataEndAssert","1230 North Ave. Dallas, Texas 98665",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatareplacedataend();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend.xhtml
new file mode 100644
index 0000000..01a773d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataend.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatareplacedataend.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg-expected.txt
new file mode 100644
index 0000000..7233ff5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedataexceedslengthofarg
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg.js
new file mode 100644
index 0000000..a9cf8e2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedataexceedslengthofarg";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceData(offset,count,arg)" method replaces the
+ characters starting at the specified offset with the
+ specified string. Test the situation where the length
+ of the arg string is greater than the specified offset.
+
+ Retrieve the character data from the last child of the
+ first employee. The "replaceData(offset,count,arg)"
+ method is then called with offset=0 and count=4 and
+ arg="260030". The method should replace characters one
+ thru four with "260030". Note that the length of the
+ specified string is greater that the specified offset.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB
+*/
+function hc_characterdatareplacedataexceedslengthofarg() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatareplacedataexceedslengthofarg") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.replaceData(0,4,"260030");
+ childData = child.data;
+
+ assertEquals("characterdataReplaceDataExceedsLengthOfArgAssert","260030 North Ave. Dallas, Texas 98551",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatareplacedataexceedslengthofarg();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg.xhtml
new file mode 100644
index 0000000..a248079
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofarg.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatareplacedataexceedslengthofarg.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata-expected.txt
new file mode 100644
index 0000000..1f39aa6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedataexceedslengthofdata
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata.js
new file mode 100644
index 0000000..b2b4205
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedataexceedslengthofdata";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the sum of the offset and count exceeds the length then
+ all the characters to the end of the data are replaced.
+
+ Retrieve the character data from the last child of the
+ first employee. The "replaceData(offset,count,arg)"
+ method is then called with offset=0 and count=50 and
+ arg="2600". The method should replace all the characters
+ with "2600". This is because the sum of the offset and
+ count exceeds the length of the character data.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB
+*/
+function hc_characterdatareplacedataexceedslengthofdata() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatareplacedataexceedslengthofdata") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.replaceData(0,50,"2600");
+ childData = child.data;
+
+ assertEquals("characterdataReplaceDataExceedsLengthOfDataAssert","2600",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatareplacedataexceedslengthofdata();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata.xhtml
new file mode 100644
index 0000000..05f593d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedataexceedslengthofdata.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatareplacedataexceedslengthofdata.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle-expected.txt
new file mode 100644
index 0000000..26be6c8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedatamiddle
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle.js
new file mode 100644
index 0000000..6558cde
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatareplacedatamiddle";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceData(offset,count,arg)" method replaces the
+ characters starting at the specified offset with the
+ specified string. Test for replacement in the
+ middle of the data.
+
+ Retrieve the character data from the last child of the
+ first employee. The "replaceData(offset,count,arg)"
+ method is then called with offset=5 and count=5 and
+ arg="South". The method should replace characters five
+ thru 9 of the character data with "South".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB
+*/
+function hc_characterdatareplacedatamiddle() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatareplacedatamiddle") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.replaceData(5,5,"South");
+ childData = child.data;
+
+ assertEquals("characterdataReplaceDataMiddleAssert","1230 South Ave. Dallas, Texas 98551",childData);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatareplacedatamiddle();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle.xhtml
new file mode 100644
index 0000000..6a01efa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatareplacedatamiddle.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatareplacedatamiddle.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue-expected.txt
new file mode 100644
index 0000000..cc5f5af
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatasetnodevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue.js
new file mode 100644
index 0000000..e56ce72
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatasetnodevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setNodeValue()" method changes the character data
+ currently stored in the node.
+ Retrieve the character data from the second child
+ of the first employee and invoke the "setNodeValue()"
+ method, call "getData()" and compare.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359
+*/
+function hc_characterdatasetnodevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatasetnodevalue") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var childData;
+ var childValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ child.nodeValue = "Marilyn Martin";
+
+ childData = child.data;
+
+ assertEquals("data","Marilyn Martin",childData);
+ childValue = child.nodeValue;
+
+ assertEquals("value","Marilyn Martin",childValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatasetnodevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue.xhtml
new file mode 100644
index 0000000..1be9f88
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasetnodevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatasetnodevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue-expected.txt
new file mode 100644
index 0000000..fff6d3c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatasubstringexceedsvalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue.js
new file mode 100644
index 0000000..043dac2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatasubstringexceedsvalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the sum of the "offset" and "count" exceeds the
+ "length" then the "substringData(offset,count)" method
+ returns all the characters to the end of the data.
+
+ Retrieve the character data from the second child
+ of the first employee and access part of the data
+ by using the substringData(offset,count) method
+ with offset=9 and count=10. The method should return
+ the substring "Martin" since offset+count > length
+ (19 > 15).
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6531BCCF
+*/
+function hc_characterdatasubstringexceedsvalue() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatasubstringexceedsvalue") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var substring;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ substring = child.substringData(9,10);
+ assertEquals("characterdataSubStringExceedsValueAssert","Martin",substring);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatasubstringexceedsvalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue.xhtml
new file mode 100644
index 0000000..f41ab58
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringexceedsvalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatasubstringexceedsvalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue-expected.txt
new file mode 100644
index 0000000..5c38d25
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatasubstringvalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue.js b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue.js
new file mode 100644
index 0000000..379e3b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdatasubstringvalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "substringData(offset,count)" method returns the
+ specified string.
+
+ Retrieve the character data from the second child
+ of the first employee and access part of the data
+ by using the substringData(offset,count) method. The
+ method should return the specified substring starting
+ at position "offset" and extract "count" characters.
+ The method should return the string "Margaret".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6531BCCF
+*/
+function hc_characterdatasubstringvalue() {
+ var success;
+ if(checkInitialization(builder, "hc_characterdatasubstringvalue") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var child;
+ var substring;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(0);
+ child = nameNode.firstChild;
+
+ substring = child.substringData(0,8);
+ assertEquals("characterdataSubStringValueAssert","Margaret",substring);
+
+}
+
+
+
+
+function runTest() {
+ hc_characterdatasubstringvalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue.xhtml
new file mode 100644
index 0000000..d283565
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_characterdatasubstringvalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_characterdatasubstringvalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment-expected.txt
new file mode 100644
index 0000000..489c6ff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_commentgetcomment
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment.js b/LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment.js
new file mode 100644
index 0000000..b7c76b4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_commentgetcomment";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ A comment is all the characters between the starting
+ '<!--' and ending '-->'
+ Retrieve the nodes of the DOM document. Search for a
+ comment node and the content is its value.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1334481328
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=509
+*/
+function hc_commentgetcomment() {
+ var success;
+ if(checkInitialization(builder, "hc_commentgetcomment") != null) return;
+ var doc;
+ var elementList;
+ var child;
+ var childName;
+ var childValue;
+ var commentCount = 0;
+ var childType;
+ var attributes;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.childNodes;
+
+ for(var indexN1005E = 0;indexN1005E < elementList.length; indexN1005E++) {
+ child = elementList.item(indexN1005E);
+ childType = child.nodeType;
+
+
+ if(
+ (8 == childType)
+ ) {
+ childName = child.nodeName;
+
+ assertEquals("nodeName","#comment",childName);
+ childValue = child.nodeValue;
+
+ assertEquals("nodeValue"," This is comment number 1.",childValue);
+ attributes = child.attributes;
+
+ assertNull("attributes",attributes);
+ commentCount += 1;
+
+ }
+
+ }
+ assertTrue("atMostOneComment",
+
+ (commentCount < 2)
+);
+
+}
+
+
+
+
+function runTest() {
+ hc_commentgetcomment();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment.xhtml
new file mode 100644
index 0000000..05e3970
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_commentgetcomment.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_commentgetcomment.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute-expected.txt
new file mode 100644
index 0000000..e87d870
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreateattribute
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute.js
new file mode 100644
index 0000000..31284f3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreateattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the entire DOM document and invoke its
+ "createAttribute(name)" method. It should create a
+ new Attribute node with the given name. The name, value
+ and type of the newly created object are retrieved and
+ output.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1084891198
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_documentcreateattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_documentcreateattribute") != null) return;
+ var doc;
+ var newAttrNode;
+ var attrValue;
+ var attrName;
+ var attrType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newAttrNode = doc.createAttribute("title");
+ attrValue = newAttrNode.nodeValue;
+
+ assertEquals("value","",attrValue);
+ attrName = newAttrNode.nodeName;
+
+ assertEqualsAutoCase("attribute", "name","title",attrName);
+ attrType = newAttrNode.nodeType;
+
+ assertEquals("type",2,attrType);
+
+}
+
+
+
+
+function runTest() {
+ hc_documentcreateattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute.xhtml
new file mode 100644
index 0000000..83103bb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentcreateattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment-expected.txt
new file mode 100644
index 0000000..b246b3d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreatecomment
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment.js b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment.js
new file mode 100644
index 0000000..fdd69a8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreatecomment";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "createComment(data)" method creates a new Comment
+ node given the specified string.
+ Retrieve the entire DOM document and invoke its
+ "createComment(data)" method. It should create a new
+ Comment node whose "data" is the specified string.
+ The content, name and type are retrieved and output.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1334481328
+*/
+function hc_documentcreatecomment() {
+ var success;
+ if(checkInitialization(builder, "hc_documentcreatecomment") != null) return;
+ var doc;
+ var newCommentNode;
+ var newCommentValue;
+ var newCommentName;
+ var newCommentType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newCommentNode = doc.createComment("This is a new Comment node");
+ newCommentValue = newCommentNode.nodeValue;
+
+ assertEquals("value","This is a new Comment node",newCommentValue);
+ newCommentName = newCommentNode.nodeName;
+
+ assertEquals("strong","#comment",newCommentName);
+ newCommentType = newCommentNode.nodeType;
+
+ assertEquals("type",8,newCommentType);
+
+}
+
+
+
+
+function runTest() {
+ hc_documentcreatecomment();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment.xhtml
new file mode 100644
index 0000000..4327ae3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatecomment.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentcreatecomment.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment-expected.txt
new file mode 100644
index 0000000..d642023
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreatedocumentfragment
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment.js b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment.js
new file mode 100644
index 0000000..40240c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreatedocumentfragment";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "createDocumentFragment()" method creates an empty
+ DocumentFragment object.
+ Retrieve the entire DOM document and invoke its
+ "createDocumentFragment()" method. The content, name,
+ type and value of the newly created object are output.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-35CB04B5
+*/
+function hc_documentcreatedocumentfragment() {
+ var success;
+ if(checkInitialization(builder, "hc_documentcreatedocumentfragment") != null) return;
+ var doc;
+ var newDocFragment;
+ var children;
+ var length;
+ var newDocFragmentName;
+ var newDocFragmentType;
+ var newDocFragmentValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newDocFragment = doc.createDocumentFragment();
+ children = newDocFragment.childNodes;
+
+ length = children.length;
+
+ assertEquals("length",0,length);
+ newDocFragmentName = newDocFragment.nodeName;
+
+ assertEquals("strong","#document-fragment",newDocFragmentName);
+ newDocFragmentType = newDocFragment.nodeType;
+
+ assertEquals("type",11,newDocFragmentType);
+ newDocFragmentValue = newDocFragment.nodeValue;
+
+ assertNull("value",newDocFragmentValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_documentcreatedocumentfragment();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment.xhtml
new file mode 100644
index 0000000..7e05f92
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatedocumentfragment.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentcreatedocumentfragment.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement-expected.txt
new file mode 100644
index 0000000..909a127
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreateelement
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement.js b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement.js
new file mode 100644
index 0000000..fbba09a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreateelement";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "createElement(tagName)" method creates an Element
+ of the type specified.
+ Retrieve the entire DOM document and invoke its
+ "createElement(tagName)" method with tagName="acronym".
+ The method should create an instance of an Element node
+ whose tagName is "acronym". The NodeName, NodeType
+ and NodeValue are returned.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-2141741547
+*/
+function hc_documentcreateelement() {
+ var success;
+ if(checkInitialization(builder, "hc_documentcreateelement") != null) return;
+ var doc;
+ var newElement;
+ var newElementName;
+ var newElementType;
+ var newElementValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newElement = doc.createElement("acronym");
+ newElementName = newElement.nodeName;
+
+ assertEqualsAutoCase("element", "strong","acronym",newElementName);
+ newElementType = newElement.nodeType;
+
+ assertEquals("type",1,newElementType);
+ newElementValue = newElement.nodeValue;
+
+ assertNull("valueInitiallyNull",newElementValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_documentcreateelement();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement.xhtml
new file mode 100644
index 0000000..6b0f416
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelement.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentcreateelement.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive-expected.txt
new file mode 100644
index 0000000..5d4f66a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreateelementcasesensitive
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive.js b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive.js
new file mode 100644
index 0000000..a22069f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreateelementcasesensitive";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The tagName parameter in the "createElement(tagName)"
+ method is case-sensitive for XML documents.
+ Retrieve the entire DOM document and invoke its
+ "createElement(tagName)" method twice. Once for tagName
+ equal to "acronym" and once for tagName equal to "ACRONYM"
+ Each call should create a distinct Element node. The
+ newly created Elements are then assigned attributes
+ that are retrieved.
+
+ Modified on 27 June 2003 to avoid setting an invalid style
+ values and checked the node names to see if they matched expectations.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-2141741547
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_documentcreateelementcasesensitive() {
+ var success;
+ if(checkInitialization(builder, "hc_documentcreateelementcasesensitive") != null) return;
+ var doc;
+ var newElement1;
+ var newElement2;
+ var attribute1;
+ var attribute2;
+ var nodeName1;
+ var nodeName2;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newElement1 = doc.createElement("ACRONYM");
+ newElement2 = doc.createElement("acronym");
+ newElement1.setAttribute("lang","EN");
+ newElement2.setAttribute("title","Dallas");
+ attribute1 = newElement1.getAttribute("lang");
+ attribute2 = newElement2.getAttribute("title");
+ assertEquals("attrib1","EN",attribute1);
+ assertEquals("attrib2","Dallas",attribute2);
+ nodeName1 = newElement1.nodeName;
+
+ nodeName2 = newElement2.nodeName;
+
+ assertEqualsAutoCase("element", "nodeName1","ACRONYM",nodeName1);
+ assertEqualsAutoCase("element", "nodeName2","acronym",nodeName2);
+
+}
+
+
+
+
+function runTest() {
+ hc_documentcreateelementcasesensitive();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive.xhtml
new file mode 100644
index 0000000..4d654c6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreateelementcasesensitive.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentcreateelementcasesensitive.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode-expected.txt
new file mode 100644
index 0000000..613be0e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreatetextnode
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode.js b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode.js
new file mode 100644
index 0000000..8b04106
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentcreatetextnode";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "createTextNode(data)" method creates a Text node
+ given the specfied string.
+ Retrieve the entire DOM document and invoke its
+ "createTextNode(data)" method. It should create a
+ new Text node whose "data" is the specified string.
+ The NodeName and NodeType are also checked.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1975348127
+*/
+function hc_documentcreatetextnode() {
+ var success;
+ if(checkInitialization(builder, "hc_documentcreatetextnode") != null) return;
+ var doc;
+ var newTextNode;
+ var newTextName;
+ var newTextValue;
+ var newTextType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newTextNode = doc.createTextNode("This is a new Text node");
+ newTextValue = newTextNode.nodeValue;
+
+ assertEquals("value","This is a new Text node",newTextValue);
+ newTextName = newTextNode.nodeName;
+
+ assertEquals("strong","#text",newTextName);
+ newTextType = newTextNode.nodeType;
+
+ assertEquals("type",3,newTextType);
+
+}
+
+
+
+
+function runTest() {
+ hc_documentcreatetextnode();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode.xhtml
new file mode 100644
index 0000000..8bc6277
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentcreatetextnode.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentcreatetextnode.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype-expected.txt
new file mode 100644
index 0000000..6ec641d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetdoctype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype.js b/LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype.js
new file mode 100644
index 0000000..c3aa3c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype.js
@@ -0,0 +1,149 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetdoctype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Access Document.doctype for hc_staff, if not text/html should return DocumentType node.
+HTML implementations may return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A31
+*/
+function hc_documentgetdoctype() {
+ var success;
+ if(checkInitialization(builder, "hc_documentgetdoctype") != null) return;
+ var doc;
+ var docType;
+ var docTypeName;
+ var nodeValue;
+ var attributes;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ if(
+
+ !(
+ (builder.contentType == "text/html")
+)
+
+ ) {
+ assertNotNull("docTypeNotNull",docType);
+
+ }
+
+ if(
+
+ (docType != null)
+
+ ) {
+ docTypeName = docType.name;
+
+
+ if(
+
+ (builder.contentType == "image/svg+xml")
+
+ ) {
+ assertEquals("nodeNameSVG","svg",docTypeName);
+
+ }
+
+ else {
+ assertEquals("nodeName","html",docTypeName);
+
+ }
+ nodeValue = docType.nodeValue;
+
+ assertNull("nodeValue",nodeValue);
+ attributes = docType.attributes;
+
+ assertNull("attributes",attributes);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_documentgetdoctype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype.xhtml
new file mode 100644
index 0000000..140ef49
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetdoctype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentgetdoctype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength-expected.txt
new file mode 100644
index 0000000..b66360f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetelementsbytagnamelength
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength.js b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength.js
new file mode 100644
index 0000000..1eb3e39
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength.js
@@ -0,0 +1,110 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetelementsbytagnamelength";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getElementsByTagName(tagName)" method returns a
+ NodeList of all the Elements with a given tagName.
+
+ Retrieve the entire DOM document and invoke its
+ "getElementsByTagName(tagName)" method with tagName
+ equal to "strong". The method should return a NodeList
+ that contains 5 elements.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-A6C9094
+*/
+function hc_documentgetelementsbytagnamelength() {
+ var success;
+ if(checkInitialization(builder, "hc_documentgetelementsbytagnamelength") != null) return;
+ var doc;
+ var nameList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ nameList = doc.getElementsByTagName("strong");
+ assertSize("documentGetElementsByTagNameLengthAssert",5,nameList);
+
+}
+
+
+
+
+function runTest() {
+ hc_documentgetelementsbytagnamelength();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength.xhtml
new file mode 100644
index 0000000..f9058eb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamelength.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentgetelementsbytagnamelength.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength-expected.txt
new file mode 100644
index 0000000..2a1b008
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetelementsbytagnametotallength
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength.js b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength.js
new file mode 100644
index 0000000..00fa119
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength.js
@@ -0,0 +1,221 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetelementsbytagnametotallength";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the entire DOM document and invoke its
+ "getElementsByTagName(tagName)" method with tagName
+ equal to "*". The method should return a NodeList
+ that contains all the elements of the document.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-A6C9094
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=251
+*/
+function hc_documentgetelementsbytagnametotallength() {
+ var success;
+ if(checkInitialization(builder, "hc_documentgetelementsbytagnametotallength") != null) return;
+ var doc;
+ var nameList;
+ expectedNames = new Array();
+ expectedNames[0] = "html";
+ expectedNames[1] = "head";
+ expectedNames[2] = "meta";
+ expectedNames[3] = "title";
+ expectedNames[4] = "script";
+ expectedNames[5] = "script";
+ expectedNames[6] = "script";
+ expectedNames[7] = "body";
+ expectedNames[8] = "p";
+ expectedNames[9] = "em";
+ expectedNames[10] = "strong";
+ expectedNames[11] = "code";
+ expectedNames[12] = "sup";
+ expectedNames[13] = "var";
+ expectedNames[14] = "acronym";
+ expectedNames[15] = "p";
+ expectedNames[16] = "em";
+ expectedNames[17] = "strong";
+ expectedNames[18] = "code";
+ expectedNames[19] = "sup";
+ expectedNames[20] = "var";
+ expectedNames[21] = "acronym";
+ expectedNames[22] = "p";
+ expectedNames[23] = "em";
+ expectedNames[24] = "strong";
+ expectedNames[25] = "code";
+ expectedNames[26] = "sup";
+ expectedNames[27] = "var";
+ expectedNames[28] = "acronym";
+ expectedNames[29] = "p";
+ expectedNames[30] = "em";
+ expectedNames[31] = "strong";
+ expectedNames[32] = "code";
+ expectedNames[33] = "sup";
+ expectedNames[34] = "var";
+ expectedNames[35] = "acronym";
+ expectedNames[36] = "p";
+ expectedNames[37] = "em";
+ expectedNames[38] = "strong";
+ expectedNames[39] = "code";
+ expectedNames[40] = "sup";
+ expectedNames[41] = "var";
+ expectedNames[42] = "acronym";
+
+ svgExpectedNames = new Array();
+ svgExpectedNames[0] = "svg";
+ svgExpectedNames[1] = "rect";
+ svgExpectedNames[2] = "script";
+ svgExpectedNames[3] = "head";
+ svgExpectedNames[4] = "meta";
+ svgExpectedNames[5] = "title";
+ svgExpectedNames[6] = "body";
+ svgExpectedNames[7] = "p";
+ svgExpectedNames[8] = "em";
+ svgExpectedNames[9] = "strong";
+ svgExpectedNames[10] = "code";
+ svgExpectedNames[11] = "sup";
+ svgExpectedNames[12] = "var";
+ svgExpectedNames[13] = "acronym";
+ svgExpectedNames[14] = "p";
+ svgExpectedNames[15] = "em";
+ svgExpectedNames[16] = "strong";
+ svgExpectedNames[17] = "code";
+ svgExpectedNames[18] = "sup";
+ svgExpectedNames[19] = "var";
+ svgExpectedNames[20] = "acronym";
+ svgExpectedNames[21] = "p";
+ svgExpectedNames[22] = "em";
+ svgExpectedNames[23] = "strong";
+ svgExpectedNames[24] = "code";
+ svgExpectedNames[25] = "sup";
+ svgExpectedNames[26] = "var";
+ svgExpectedNames[27] = "acronym";
+ svgExpectedNames[28] = "p";
+ svgExpectedNames[29] = "em";
+ svgExpectedNames[30] = "strong";
+ svgExpectedNames[31] = "code";
+ svgExpectedNames[32] = "sup";
+ svgExpectedNames[33] = "var";
+ svgExpectedNames[34] = "acronym";
+ svgExpectedNames[35] = "p";
+ svgExpectedNames[36] = "em";
+ svgExpectedNames[37] = "strong";
+ svgExpectedNames[38] = "code";
+ svgExpectedNames[39] = "sup";
+ svgExpectedNames[40] = "var";
+ svgExpectedNames[41] = "acronym";
+
+ var actualNames = new Array();
+
+ var thisElement;
+ var thisTag;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ nameList = doc.getElementsByTagName("*");
+ for(var indexN10148 = 0;indexN10148 < nameList.length; indexN10148++) {
+ thisElement = nameList.item(indexN10148);
+ thisTag = thisElement.tagName;
+
+ actualNames[actualNames.length] = thisTag;
+
+ }
+
+ if(
+
+ (builder.contentType == "image/svg+xml")
+
+ ) {
+ assertEqualsListAutoCase("element", "svgTagNames",svgExpectedNames,actualNames);
+
+ }
+
+ else {
+ assertEqualsListAutoCase("element", "tagNames",expectedNames,actualNames);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_documentgetelementsbytagnametotallength();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength.xhtml
new file mode 100644
index 0000000..b9e69e2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnametotallength.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentgetelementsbytagnametotallength.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue-expected.txt
new file mode 100644
index 0000000..b710977
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetelementsbytagnamevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue.js
new file mode 100644
index 0000000..e9d39ed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetelementsbytagnamevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getElementsByTagName(tagName)" method returns a
+ NodeList of all the Elements with a given tagName
+ in a pre-order traversal of the tree.
+
+ Retrieve the entire DOM document and invoke its
+ "getElementsByTagName(tagName)" method with tagName
+ equal to "strong". The method should return a NodeList
+ that contains 5 elements. The FOURTH item in the
+ list is retrieved and output.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-A6C9094
+*/
+function hc_documentgetelementsbytagnamevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_documentgetelementsbytagnamevalue") != null) return;
+ var doc;
+ var nameList;
+ var nameNode;
+ var firstChild;
+ var childValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ nameList = doc.getElementsByTagName("strong");
+ nameNode = nameList.item(3);
+ firstChild = nameNode.firstChild;
+
+ childValue = firstChild.nodeValue;
+
+ assertEquals("documentGetElementsByTagNameValueAssert","Jeny Oconnor",childValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_documentgetelementsbytagnamevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue.xhtml
new file mode 100644
index 0000000..a6c3884
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetelementsbytagnamevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentgetelementsbytagnamevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation-expected.txt
new file mode 100644
index 0000000..c15f7e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetimplementation
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation.js b/LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation.js
new file mode 100644
index 0000000..5bb3f3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetimplementation";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the entire DOM document and invoke its
+ "getImplementation()" method. If contentType="text/html",
+ DOMImplementation.hasFeature("HTML","1.0") should be true.
+ Otherwise, DOMImplementation.hasFeature("XML", "1.0")
+ should be true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1B793EBA
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=245
+*/
+function hc_documentgetimplementation() {
+ var success;
+ if(checkInitialization(builder, "hc_documentgetimplementation") != null) return;
+ var doc;
+ var docImpl;
+ var xmlstate;
+ var htmlstate;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docImpl = doc.implementation;
+xmlstate = docImpl.hasFeature("XML","1.0");
+htmlstate = docImpl.hasFeature("HTML","1.0");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ assertTrue("supports_HTML_1.0",htmlstate);
+
+ }
+
+ else {
+ assertTrue("supports_XML_1.0",xmlstate);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_documentgetimplementation();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation.xhtml
new file mode 100644
index 0000000..8d99629
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetimplementation.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentgetimplementation.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode-expected.txt
new file mode 100644
index 0000000..3fddd5d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetrootnode
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode.js b/LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode.js
new file mode 100644
index 0000000..e221ff1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentgetrootnode";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Load a document and invoke its
+ "getDocumentElement()" method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-87CD092
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=251
+*/
+function hc_documentgetrootnode() {
+ var success;
+ if(checkInitialization(builder, "hc_documentgetrootnode") != null) return;
+ var doc;
+ var root;
+ var rootName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ root = doc.documentElement;
+
+ rootName = root.nodeName;
+
+
+ if(
+
+ (builder.contentType == "image/svg+xml")
+
+ ) {
+ assertEquals("svgTagName","svg",rootName);
+
+ }
+
+ else {
+ assertEqualsAutoCase("element", "docElemName","html",rootName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_documentgetrootnode();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode.xhtml
new file mode 100644
index 0000000..db71c78
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentgetrootnode.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentgetrootnode.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute-expected.txt
new file mode 100644
index 0000000..94d5d93
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentinvalidcharacterexceptioncreateattribute
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute.js
new file mode 100644
index 0000000..9038f2e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentinvalidcharacterexceptioncreateattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "createAttribute(tagName)" method raises an
+ INVALID_CHARACTER_ERR DOMException if the specified
+ tagName contains an invalid character.
+
+ Retrieve the entire DOM document and invoke its
+ "createAttribute(tagName)" method with the tagName equal
+ to the string "invalid^Name". Due to the invalid
+ character the desired EXCEPTION should be raised.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1084891198
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-1084891198')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1084891198
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_documentinvalidcharacterexceptioncreateattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_documentinvalidcharacterexceptioncreateattribute") != null) return;
+ var doc;
+ var createdAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ {
+ success = false;
+ try {
+ createdAttr = doc.createAttribute("invalid^Name");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_documentinvalidcharacterexceptioncreateattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute.xhtml
new file mode 100644
index 0000000..65deb6d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentinvalidcharacterexceptioncreateattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1-expected.txt
new file mode 100644
index 0000000..5b30956
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1.js b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1.js
new file mode 100644
index 0000000..4f9933d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Creating an attribute with an empty name should cause an INVALID_CHARACTER_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1084891198
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-1084891198')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1084891198
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=525
+*/
+function hc_documentinvalidcharacterexceptioncreateattribute1() {
+ var success;
+ if(checkInitialization(builder, "hc_documentinvalidcharacterexceptioncreateattribute1") != null) return;
+ var doc;
+ var createdAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ {
+ success = false;
+ try {
+ createdAttr = doc.createAttribute("");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_documentinvalidcharacterexceptioncreateattribute1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1.xhtml
new file mode 100644
index 0000000..2b54072
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateattribute1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentinvalidcharacterexceptioncreateattribute1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement-expected.txt
new file mode 100644
index 0000000..65eee8f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentinvalidcharacterexceptioncreateelement
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement.js b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement.js
new file mode 100644
index 0000000..624a46a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentinvalidcharacterexceptioncreateelement";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "createElement(tagName)" method raises an
+ INVALID_CHARACTER_ERR DOMException if the specified
+ tagName contains an invalid character.
+
+ Retrieve the entire DOM document and invoke its
+ "createElement(tagName)" method with the tagName equal
+ to the string "invalid^Name". Due to the invalid
+ character the desired EXCEPTION should be raised.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-2141741547
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-2141741547')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-2141741547
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_documentinvalidcharacterexceptioncreateelement() {
+ var success;
+ if(checkInitialization(builder, "hc_documentinvalidcharacterexceptioncreateelement") != null) return;
+ var doc;
+ var badElement;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ {
+ success = false;
+ try {
+ badElement = doc.createElement("invalid^Name");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_documentinvalidcharacterexceptioncreateelement();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement.xhtml
new file mode 100644
index 0000000..e17ad05
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentinvalidcharacterexceptioncreateelement.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1-expected.txt
new file mode 100644
index 0000000..cf4c0e8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentinvalidcharacterexceptioncreateelement1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1.js b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1.js
new file mode 100644
index 0000000..cbf69fe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_documentinvalidcharacterexceptioncreateelement1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Creating an element with an empty name should cause an INVALID_CHARACTER_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-2141741547
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-2141741547')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-2141741547
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=525
+*/
+function hc_documentinvalidcharacterexceptioncreateelement1() {
+ var success;
+ if(checkInitialization(builder, "hc_documentinvalidcharacterexceptioncreateelement1") != null) return;
+ var doc;
+ var badElement;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ {
+ success = false;
+ try {
+ badElement = doc.createElement("");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_documentinvalidcharacterexceptioncreateelement1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1.xhtml
new file mode 100644
index 0000000..9dbd232
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_documentinvalidcharacterexceptioncreateelement1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_documentinvalidcharacterexceptioncreateelement1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion-expected.txt
new file mode 100644
index 0000000..34b0a94
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_domimplementationfeaturenoversion
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion.js b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion.js
new file mode 100644
index 0000000..f723ce5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_domimplementationfeaturenoversion";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Load a document and invoke its
+ "getImplementation()" method. This should create a
+ DOMImplementation object whose "hasFeature(feature,
+ version)" method is invoked with version equal to "".
+ If the version is not specified, supporting any version
+ feature will cause the method to return "true".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-5CED94D7
+* @see http://www.w3.org/2000/11/DOM-Level-2-errata#core-14
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=245
+*/
+function hc_domimplementationfeaturenoversion() {
+ var success;
+ if(checkInitialization(builder, "hc_domimplementationfeaturenoversion") != null) return;
+ var doc;
+ var domImpl;
+ var state;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ state = domImpl.hasFeature("HTML","");
+
+ }
+
+ else {
+ state = domImpl.hasFeature("XML","");
+
+ }
+ assertTrue("hasFeatureBlank",state);
+
+}
+
+
+
+
+function runTest() {
+ hc_domimplementationfeaturenoversion();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion.xhtml
new file mode 100644
index 0000000..9259d09
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenoversion.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_domimplementationfeaturenoversion.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull-expected.txt
new file mode 100644
index 0000000..3a7b1ed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_domimplementationfeaturenull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull.js b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull.js
new file mode 100644
index 0000000..bfa69f3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_domimplementationfeaturenull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("hasNullString", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Load a document and invoke its
+ "getImplementation()" method. This should create a
+ DOMImplementation object whose "hasFeature(feature,
+ version)" method is invoked with version equal to null.
+ If the version is not specified, supporting any version
+ feature will cause the method to return "true".
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-5CED94D7
+* @see http://www.w3.org/2000/11/DOM-Level-2-errata#core-14
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=245
+*/
+function hc_domimplementationfeaturenull() {
+ var success;
+ if(checkInitialization(builder, "hc_domimplementationfeaturenull") != null) return;
+ var doc;
+ var domImpl;
+ var state;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ state = domImpl.hasFeature("HTML",null);
+assertTrue("supports_HTML_null",state);
+
+ }
+
+ else {
+ state = domImpl.hasFeature("XML",null);
+assertTrue("supports_XML_null",state);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_domimplementationfeaturenull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull.xhtml
new file mode 100644
index 0000000..a384d68
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturenull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_domimplementationfeaturenull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml-expected.txt
new file mode 100644
index 0000000..90191a1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_domimplementationfeaturexml
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml.js b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml.js
new file mode 100644
index 0000000..acd4d37
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_domimplementationfeaturexml";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the entire DOM document and invoke its
+ "getImplementation()" method. This should create a
+ DOMImplementation object whose "hasFeature(feature,
+ version)" method is invoked with "feature" equal to "html" or "xml".
+ The method should return a boolean "true".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-5CED94D7
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=245
+*/
+function hc_domimplementationfeaturexml() {
+ var success;
+ if(checkInitialization(builder, "hc_domimplementationfeaturexml") != null) return;
+ var doc;
+ var domImpl;
+ var state;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ domImpl = doc.implementation;
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ state = domImpl.hasFeature("html","1.0");
+assertTrue("supports_html_1.0",state);
+
+ }
+
+ else {
+ state = domImpl.hasFeature("xml","1.0");
+assertTrue("supports_xml_1.0",state);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_domimplementationfeaturexml();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml.xhtml
new file mode 100644
index 0000000..f088311
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_domimplementationfeaturexml.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_domimplementationfeaturexml.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute-expected.txt
new file mode 100644
index 0000000..ba907ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementaddnewattribute
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute.js
new file mode 100644
index 0000000..90d483b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementaddnewattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setAttribute(name,value)" method adds a new attribute
+ to the Element
+
+ Retrieve the last child of the last employee, then
+ add an attribute to it by invoking the
+ "setAttribute(name,value)" method. It should create
+ a "strong" attribute with an assigned value equal to
+ "value".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_elementaddnewattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_elementaddnewattribute") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attrValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(4);
+ testEmployee.setAttribute("lang","EN-us");
+ attrValue = testEmployee.getAttribute("lang");
+ assertEquals("attrValue","EN-us",attrValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementaddnewattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute.xhtml
new file mode 100644
index 0000000..77b7a7d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementaddnewattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementaddnewattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute-expected.txt
new file mode 100644
index 0000000..80b4a59
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementassociatedattribute
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute.js
new file mode 100644
index 0000000..c3642a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementassociatedattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the first attribute from the last child of
+ the first employee and invoke the "getSpecified()"
+ method. This test is only intended to show that
+ Elements can actually have attributes. This test uses
+ the "getNamedItem(name)" method from the NamedNodeMap
+ interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+*/
+function hc_elementassociatedattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_elementassociatedattribute") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attributes;
+ var domesticAttr;
+ var specified;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(0);
+ attributes = testEmployee.attributes;
+
+ domesticAttr = attributes.getNamedItem("title");
+ specified = domesticAttr.specified;
+
+ assertTrue("acronymTitleSpecified",specified);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementassociatedattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute.xhtml
new file mode 100644
index 0000000..313c0a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementassociatedattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementassociatedattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue-expected.txt
new file mode 100644
index 0000000..bc0303a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementchangeattributevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue.js
new file mode 100644
index 0000000..2777f22
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementchangeattributevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setAttribute(name,value)" method adds a new attribute
+ to the Element. If the "strong" is already present, then
+ its value should be changed to the new one that is in
+ the "value" parameter.
+
+ Retrieve the last child of the fourth employee, then add
+ an attribute to it by invoking the
+ "setAttribute(name,value)" method. Since the name of the
+ used attribute("class") is already present in this
+ element, then its value should be changed to the new one
+ of the "value" parameter.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082
+*/
+function hc_elementchangeattributevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_elementchangeattributevalue") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attrValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(3);
+ testEmployee.setAttribute("class","Neither");
+ attrValue = testEmployee.getAttribute("class");
+ assertEquals("elementChangeAttributeValueAssert","Neither",attrValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementchangeattributevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue.xhtml
new file mode 100644
index 0000000..6883a72
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementchangeattributevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementchangeattributevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute-expected.txt
new file mode 100644
index 0000000..a7ec3c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementcreatenewattribute
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute.js
new file mode 100644
index 0000000..aad9aa1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementcreatenewattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setAttributeNode(newAttr)" method adds a new
+ attribute to the Element.
+
+ Retrieve first address element and add
+ a new attribute node to it by invoking its
+ "setAttributeNode(newAttr)" method. This test makes use
+ of the "createAttribute(name)" method from the Document
+ interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-887236154
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_elementcreatenewattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_elementcreatenewattribute") != null) return;
+ var doc;
+ var elementList;
+ var testAddress;
+ var newAttribute;
+ var oldAttr;
+ var districtAttr;
+ var attrVal;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(0);
+ newAttribute = doc.createAttribute("lang");
+ oldAttr = testAddress.setAttributeNode(newAttribute);
+ assertNull("old_attr_doesnt_exist",oldAttr);
+ districtAttr = testAddress.getAttributeNode("lang");
+ assertNotNull("new_district_accessible",districtAttr);
+attrVal = testAddress.getAttribute("lang");
+ assertEquals("attr_value","",attrVal);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementcreatenewattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute.xhtml
new file mode 100644
index 0000000..c45ee6d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementcreatenewattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementcreatenewattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode-expected.txt
new file mode 100644
index 0000000..f4cc3e7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetattributenode
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode.js b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode.js
new file mode 100644
index 0000000..17b0106
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetattributenode";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the attribute "title" from the last child
+ of the first "p" element and check its node name.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-217A91B8
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
+*/
+function hc_elementgetattributenode() {
+ var success;
+ if(checkInitialization(builder, "hc_elementgetattributenode") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var domesticAttr;
+ var nodeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(0);
+ domesticAttr = testEmployee.getAttributeNode("title");
+ nodeName = domesticAttr.nodeName;
+
+ assertEqualsAutoCase("attribute", "nodeName","title",nodeName);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementgetattributenode();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode.xhtml
new file mode 100644
index 0000000..a711030
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenode.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementgetattributenode.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull-expected.txt
new file mode 100644
index 0000000..6a95f5b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetattributenodenull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull.js b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull.js
new file mode 100644
index 0000000..2c9a905
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetattributenodenull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getAttributeNode(name)" method retrieves an
+ attribute node by name. It should return null if the
+ "strong" attribute does not exist.
+
+ Retrieve the last child of the first employee and attempt
+ to retrieve a non-existing attribute. The method should
+ return "null". The non-existing attribute to be used
+ is "invalidAttribute".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-217A91B8
+*/
+function hc_elementgetattributenodenull() {
+ var success;
+ if(checkInitialization(builder, "hc_elementgetattributenodenull") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var domesticAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(0);
+ domesticAttr = testEmployee.getAttributeNode("invalidAttribute");
+ assertNull("elementGetAttributeNodeNullAssert",domesticAttr);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementgetattributenodenull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull.xhtml
new file mode 100644
index 0000000..76c0039
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetattributenodenull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementgetattributenodenull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty-expected.txt
new file mode 100644
index 0000000..f54e050
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementempty
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty.js b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty.js
new file mode 100644
index 0000000..b4ddf55
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementempty";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getAttribute(name)" method returns an empty
+ string if no value was assigned to an attribute and
+ no default value was given in the DTD file.
+
+ Retrieve the last child of the last employee, then
+ invoke "getAttribute(name)" method, where "strong" is an
+ attribute without a specified or DTD default value.
+ The "getAttribute(name)" method should return the empty
+ string. This method makes use of the
+ "createAttribute(newAttr)" method from the Document
+ interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-666EE0F9
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_elementgetelementempty() {
+ var success;
+ if(checkInitialization(builder, "hc_elementgetelementempty") != null) return;
+ var doc;
+ var newAttribute;
+ var elementList;
+ var testEmployee;
+ var domesticAttr;
+ var attrValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newAttribute = doc.createAttribute("lang");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(3);
+ domesticAttr = testEmployee.setAttributeNode(newAttribute);
+ attrValue = testEmployee.getAttribute("lang");
+ assertEquals("elementGetElementEmptyAssert","",attrValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementgetelementempty();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty.xhtml
new file mode 100644
index 0000000..3492728
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementempty.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementgetelementempty.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname-expected.txt
new file mode 100644
index 0000000..671496c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagname
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname.js b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname.js
new file mode 100644
index 0000000..bed6cfe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagname";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getElementsByTagName(name)" method returns a list
+of all descendant Elements with the given tag name.
+Test for an empty list.
+
+Create a NodeList of all the descendant elements
+using the string "noMatch" as the tagName.
+The method should return a NodeList whose length is
+"0" since there are not any descendant elements
+that match the given tag name.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1938918D
+*/
+function hc_elementgetelementsbytagname() {
+ var success;
+ if(checkInitialization(builder, "hc_elementgetelementsbytagname") != null) return;
+ var doc;
+ var elementList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ assertSize("elementGetElementsByTagNameAssert",5,elementList);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementgetelementsbytagname();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname.xhtml
new file mode 100644
index 0000000..0fc1fe9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagname.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementgetelementsbytagname.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist-expected.txt
new file mode 100644
index 0000000..0610645
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagnameaccessnodelist
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist.js b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist.js
new file mode 100644
index 0000000..cd53408
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagnameaccessnodelist";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getElementsByTagName(name)" method returns a list
+of all descendant Elements in the order the children
+were encountered in a pre order traversal of the element
+tree.
+
+Create a NodeList of all the descendant elements
+using the string "p" as the tagName.
+The method should return a NodeList whose length is
+"5" in the order the children were encountered.
+Access the FOURTH element in the NodeList. The FOURTH
+element, the first or second should be an "em" node with
+the content "EMP0004".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1938918D
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_elementgetelementsbytagnameaccessnodelist() {
+ var success;
+ if(checkInitialization(builder, "hc_elementgetelementsbytagnameaccessnodelist") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var firstC;
+ var childName;
+ var nodeType;
+ var employeeIDNode;
+ var employeeID;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ testEmployee = elementList.item(3);
+ firstC = testEmployee.firstChild;
+
+ nodeType = firstC.nodeType;
+
+
+ while(
+ (3 == nodeType)
+ ) {
+ firstC = firstC.nextSibling;
+
+ nodeType = firstC.nodeType;
+
+
+ }
+childName = firstC.nodeName;
+
+ assertEqualsAutoCase("element", "childName","em",childName);
+ employeeIDNode = firstC.firstChild;
+
+ employeeID = employeeIDNode.nodeValue;
+
+ assertEquals("employeeID","EMP0004",employeeID);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementgetelementsbytagnameaccessnodelist();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist.xhtml
new file mode 100644
index 0000000..9f2fb92
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnameaccessnodelist.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementgetelementsbytagnameaccessnodelist.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch-expected.txt
new file mode 100644
index 0000000..928e31b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagnamenomatch
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch.js b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch.js
new file mode 100644
index 0000000..941fd4a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch.js
@@ -0,0 +1,110 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagnamenomatch";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getElementsByTagName(name)" method returns a list
+of all descendant Elements with the given tag name.
+
+Create a NodeList of all the descendant elements
+using the string "employee" as the tagName.
+The method should return a NodeList whose length is
+"5".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1938918D
+*/
+function hc_elementgetelementsbytagnamenomatch() {
+ var success;
+ if(checkInitialization(builder, "hc_elementgetelementsbytagnamenomatch") != null) return;
+ var doc;
+ var elementList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("noMatch");
+ assertSize("elementGetElementsByTagNameNoMatchNoMatchAssert",0,elementList);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementgetelementsbytagnamenomatch();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch.xhtml
new file mode 100644
index 0000000..228ab35
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamenomatch.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementgetelementsbytagnamenomatch.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue-expected.txt
new file mode 100644
index 0000000..ba62605
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagnamespecialvalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue.js b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue.js
new file mode 100644
index 0000000..3b8c10d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagnamespecialvalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getElementsByTagName(name)" method may use the
+special value "*" to match all tags in the element
+tree.
+
+Create a NodeList of all the descendant elements
+of the last employee by using the special value "*".
+The method should return all the descendant children(6)
+in the order the children were encountered.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1938918D
+*/
+function hc_elementgetelementsbytagnamespecialvalue() {
+ var success;
+ if(checkInitialization(builder, "hc_elementgetelementsbytagnamespecialvalue") != null) return;
+ var doc;
+ var elementList;
+ var lastEmployee;
+ var lastempList;
+ var child;
+ var childName;
+ var result = new Array();
+
+ expectedResult = new Array();
+ expectedResult[0] = "em";
+ expectedResult[1] = "strong";
+ expectedResult[2] = "code";
+ expectedResult[3] = "sup";
+ expectedResult[4] = "var";
+ expectedResult[5] = "acronym";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ lastEmployee = elementList.item(4);
+ lastempList = lastEmployee.getElementsByTagName("*");
+ for(var indexN10067 = 0;indexN10067 < lastempList.length; indexN10067++) {
+ child = lastempList.item(indexN10067);
+ childName = child.nodeName;
+
+ result[result.length] = childName;
+
+ }
+ assertEqualsListAutoCase("element", "tagNames",expectedResult,result);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementgetelementsbytagnamespecialvalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue.xhtml
new file mode 100644
index 0000000..cd2c106
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgetelementsbytagnamespecialvalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementgetelementsbytagnamespecialvalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgettagname-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementgettagname-expected.txt
new file mode 100644
index 0000000..b5d5045
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgettagname-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgettagname
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgettagname.js b/LayoutTests/dom/xhtml/level1/core/hc_elementgettagname.js
new file mode 100644
index 0000000..567d234
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgettagname.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgettagname";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Invoke the "getTagName()" method one the
+ root node. The value returned should be "html" or "svg".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-104682815
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=251
+*/
+function hc_elementgettagname() {
+ var success;
+ if(checkInitialization(builder, "hc_elementgettagname") != null) return;
+ var doc;
+ var root;
+ var tagname;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ root = doc.documentElement;
+
+ tagname = root.tagName;
+
+
+ if(
+
+ (builder.contentType == "image/svg+xml")
+
+ ) {
+ assertEquals("svgTagname","svg",tagname);
+
+ }
+
+ else {
+ assertEqualsAutoCase("element", "tagname","html",tagname);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_elementgettagname();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementgettagname.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementgettagname.xhtml
new file mode 100644
index 0000000..04fd911
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementgettagname.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementgettagname.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr-expected.txt
new file mode 100644
index 0000000..1c27472
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementinuseattributeerr
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr.js b/LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr.js
new file mode 100644
index 0000000..fa2fd0a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementinuseattributeerr";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setAttributeNode(newAttr)" method raises an
+ "INUSE_ATTRIBUTE_ERR DOMException if the "newAttr"
+ is already an attribute of another element.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INUSE_ATTRIBUTE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-887236154
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-887236154')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INUSE_ATTRIBUTE_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=244
+*/
+function hc_elementinuseattributeerr() {
+ var success;
+ if(checkInitialization(builder, "hc_elementinuseattributeerr") != null) return;
+ var doc;
+ var newAttribute;
+ var addressElementList;
+ var testAddress;
+ var newElement;
+ var attrAddress;
+ var appendedChild;
+ var setAttr1;
+ var setAttr2;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressElementList = doc.getElementsByTagName("body");
+ testAddress = addressElementList.item(0);
+ newElement = doc.createElement("p");
+ appendedChild = testAddress.appendChild(newElement);
+ newAttribute = doc.createAttribute("title");
+ setAttr1 = newElement.setAttributeNode(newAttribute);
+
+ {
+ success = false;
+ try {
+ setAttr2 = testAddress.setAttributeNode(newAttribute);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 10);
+ }
+ assertTrue("throw_INUSE_ATTRIBUTE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_elementinuseattributeerr();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr.xhtml
new file mode 100644
index 0000000..9656a14
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementinuseattributeerr.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementinuseattributeerr.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception-expected.txt
new file mode 100644
index 0000000..64f921c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementinvalidcharacterexception
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception.js b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception.js
new file mode 100644
index 0000000..4d581a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementinvalidcharacterexception";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setAttribute(name,value)" method raises an
+ "INVALID_CHARACTER_ERR DOMException if the specified
+ name contains an invalid character.
+
+ Retrieve the last child of the first employee and
+ call its "setAttribute(name,value)" method with
+ "strong" containing an invalid character.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-F68F082')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_elementinvalidcharacterexception() {
+ var success;
+ if(checkInitialization(builder, "hc_elementinvalidcharacterexception") != null) return;
+ var doc;
+ var elementList;
+ var testAddress;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(0);
+
+ {
+ success = false;
+ try {
+ testAddress.setAttribute("invalid^Name","value");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_elementinvalidcharacterexception();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception.xhtml
new file mode 100644
index 0000000..3027072
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementinvalidcharacterexception.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1-expected.txt
new file mode 100644
index 0000000..1f29e26
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementinvalidcharacterexception1
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1.js b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1.js
new file mode 100644
index 0000000..5376968
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementinvalidcharacterexception1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Calling Element.setAttribute with an empty name will cause an INVALID_CHARACTER_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-F68F082')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=525
+*/
+function hc_elementinvalidcharacterexception1() {
+ var success;
+ if(checkInitialization(builder, "hc_elementinvalidcharacterexception1") != null) return;
+ var doc;
+ var elementList;
+ var testAddress;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(0);
+
+ {
+ success = false;
+ try {
+ testAddress.setAttribute("","value");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_elementinvalidcharacterexception1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1.xhtml
new file mode 100644
index 0000000..eab9ff7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementinvalidcharacterexception1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementinvalidcharacterexception1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize-expected.txt
new file mode 100644
index 0000000..8b1dbe9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementnormalize
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize.js b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize.js
new file mode 100644
index 0000000..c00a5bc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementnormalize";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Append a couple of text nodes to the first sup element, normalize the
+document element and check that the element has been normalized.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-162CF083
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=546
+*/
+function hc_elementnormalize() {
+ var success;
+ if(checkInitialization(builder, "hc_elementnormalize") != null) return;
+ var doc;
+ var root;
+ var elementList;
+ var testName;
+ var firstChild;
+ var childValue;
+ var textNode;
+ var retNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("sup");
+ testName = elementList.item(0);
+ textNode = doc.createTextNode("");
+ retNode = testName.appendChild(textNode);
+ textNode = doc.createTextNode(",000");
+ retNode = testName.appendChild(textNode);
+ root = doc.documentElement;
+
+ root.normalize();
+ elementList = doc.getElementsByTagName("sup");
+ testName = elementList.item(0);
+ firstChild = testName.firstChild;
+
+ childValue = firstChild.nodeValue;
+
+ assertEquals("elementNormalizeAssert","56,000,000",childValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementnormalize();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize.xhtml
new file mode 100644
index 0000000..615542d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementnormalize.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2-expected.txt
new file mode 100644
index 0000000..902f99d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementnormalize2
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2.js b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2.js
new file mode 100644
index 0000000..b2197ed
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementnormalize2";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Add an empty text node to an existing attribute node, normalize the containing element
+and check that the attribute node has eliminated the empty text.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-162CF083
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=482
+*/
+function hc_elementnormalize2() {
+ var success;
+ if(checkInitialization(builder, "hc_elementnormalize2") != null) return;
+ var doc;
+ var root;
+ var elementList;
+ var element;
+ var firstChild;
+ var secondChild;
+ var childValue;
+ var emptyText;
+ var attrNode;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ root = doc.documentElement;
+
+ emptyText = doc.createTextNode("");
+ elementList = root.getElementsByTagName("acronym");
+ element = elementList.item(0);
+ attrNode = element.getAttributeNode("title");
+ retval = attrNode.appendChild(emptyText);
+ element.normalize();
+ attrNode = element.getAttributeNode("title");
+ firstChild = attrNode.firstChild;
+
+ childValue = firstChild.nodeValue;
+
+ assertEquals("firstChild","Yes",childValue);
+ secondChild = firstChild.nextSibling;
+
+ assertNull("secondChildNull",secondChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementnormalize2();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2.xhtml
new file mode 100644
index 0000000..2c2dd56
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementnormalize2.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementnormalize2.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr-expected.txt
new file mode 100644
index 0000000..23acc9b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementnotfounderr
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr.js b/LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr.js
new file mode 100644
index 0000000..ad15587
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementnotfounderr";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeAttributeNode(oldAttr)" method raises a
+ NOT_FOUND_ERR DOMException if the "oldAttr" attribute
+ is not an attribute of the element.
+
+ Retrieve the last employee and attempt to remove
+ a non existing attribute node. This should cause the
+ intended exception to be raised. This test makes use
+ of the "createAttribute(name)" method from the Document
+ interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INUSE_ATTRIBUTE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D589198
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-D589198')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INUSE_ATTRIBUTE_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_elementnotfounderr() {
+ var success;
+ if(checkInitialization(builder, "hc_elementnotfounderr") != null) return;
+ var doc;
+ var oldAttribute;
+ var addressElementList;
+ var testAddress;
+ var attrAddress;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressElementList = doc.getElementsByTagName("acronym");
+ testAddress = addressElementList.item(4);
+ oldAttribute = doc.createAttribute("title");
+
+ {
+ success = false;
+ try {
+ attrAddress = testAddress.removeAttributeNode(oldAttribute);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_elementnotfounderr();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr.xhtml
new file mode 100644
index 0000000..f8387ab
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementnotfounderr.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementnotfounderr.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute-expected.txt
new file mode 100644
index 0000000..1c1977c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementremoveattribute
+Status failure
+Message attrValue: assertEquals failed, actual null, expected .
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute.js
new file mode 100644
index 0000000..81224e7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementremoveattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeAttribute(name)" removes an attribute by name.
+ If the attribute has a default value, it is immediately
+ replaced. However, there is no default values in the HTML
+ compatible tests, so its value is "".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6D6AC0F9
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2002Mar/0002.html
+*/
+function hc_elementremoveattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_elementremoveattribute") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attrValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(3);
+ testEmployee.removeAttribute("class");
+ attrValue = testEmployee.getAttribute("class");
+ assertEquals("attrValue","",attrValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementremoveattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute.xhtml
new file mode 100644
index 0000000..4cf316a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementremoveattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate-expected.txt
new file mode 100644
index 0000000..fb4d802
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementremoveattributeaftercreate
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate.js b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate.js
new file mode 100644
index 0000000..724a3e8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementremoveattributeaftercreate";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeAttributeNode(oldAttr)" method removes the
+ specified attribute.
+
+ Retrieve the last child of the third employee, add a
+ new "lang" attribute to it and then try to remove it.
+ To verify that the node was removed use the
+ "getNamedItem(name)" method from the NamedNodeMap
+ interface. It also uses the "getAttributes()" method
+ from the Node interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D589198
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_elementremoveattributeaftercreate() {
+ var success;
+ if(checkInitialization(builder, "hc_elementremoveattributeaftercreate") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var newAttribute;
+ var attributes;
+ var districtAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(2);
+ newAttribute = doc.createAttribute("lang");
+ districtAttr = testEmployee.setAttributeNode(newAttribute);
+ districtAttr = testEmployee.removeAttributeNode(newAttribute);
+ attributes = testEmployee.attributes;
+
+ districtAttr = attributes.getNamedItem("lang");
+ assertNull("removed_item_null",districtAttr);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementremoveattributeaftercreate();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate.xhtml
new file mode 100644
index 0000000..3b1cbb1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributeaftercreate.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementremoveattributeaftercreate.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode-expected.txt
new file mode 100644
index 0000000..e9ddd18
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementremoveattributenode
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode.js b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode.js
new file mode 100644
index 0000000..58bf730
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode.js
@@ -0,0 +1,119 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementremoveattributenode";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeAttributeNode(oldAttr)" method returns the
+ node that was removed.
+
+ Retrieve the last child of the third employee and
+ remove its "class" Attr node. The method should
+ return the old attribute node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D589198
+*/
+function hc_elementremoveattributenode() {
+ var success;
+ if(checkInitialization(builder, "hc_elementremoveattributenode") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var streetAttr;
+ var removedAttr;
+ var removedValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(2);
+ streetAttr = testEmployee.getAttributeNode("class");
+ removedAttr = testEmployee.removeAttributeNode(streetAttr);
+ assertNotNull("removedAttrNotNull",removedAttr);
+removedValue = removedAttr.value;
+
+ assertEquals("elementRemoveAttributeNodeAssert","No",removedValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementremoveattributenode();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode.xhtml
new file mode 100644
index 0000000..a485256
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementremoveattributenode.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementremoveattributenode.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself-expected.txt
new file mode 100644
index 0000000..b68390e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementreplaceattributewithself
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself.js b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself.js
new file mode 100644
index 0000000..14b1f7d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementreplaceattributewithself";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+This test calls setAttributeNode to replace an attribute with itself.
+Since the node is not an attribute of another Element, it would
+be inappropriate to throw an INUSE_ATTRIBUTE_ERR.
+
+This test was derived from elementinuserattributeerr which
+inadvertanly made this test.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-887236154
+*/
+function hc_elementreplaceattributewithself() {
+ var success;
+ if(checkInitialization(builder, "hc_elementreplaceattributewithself") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var streetAttr;
+ var replacedAttr;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(2);
+ streetAttr = testEmployee.getAttributeNode("class");
+ replacedAttr = testEmployee.setAttributeNode(streetAttr);
+ assertSame("replacedAttr",streetAttr,replacedAttr);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementreplaceattributewithself();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself.xhtml
new file mode 100644
index 0000000..4c0ed6d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceattributewithself.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementreplaceattributewithself.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute-expected.txt
new file mode 100644
index 0000000..58399b6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementreplaceexistingattribute
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute.js
new file mode 100644
index 0000000..949ac3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementreplaceexistingattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setAttributeNode(newAttr)" method adds a new
+ attribute to the Element. If the "newAttr" Attr node is
+ already present in this element, it should replace the
+ existing one.
+
+ Retrieve the last child of the third employee and add a
+ new attribute node by invoking the "setAttributeNode(new
+ Attr)" method. The new attribute node to be added is
+ "class", which is already present in this element. The
+ method should replace the existing Attr node with the
+ new one. This test uses the "createAttribute(name)"
+ method from the Document interface.
+
+* @author Curt Arnold
+*/
+function hc_elementreplaceexistingattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_elementreplaceexistingattribute") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var newAttribute;
+ var strong;
+ var setAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(2);
+ newAttribute = doc.createAttribute("class");
+ setAttr = testEmployee.setAttributeNode(newAttribute);
+ strong = testEmployee.getAttribute("class");
+ assertEquals("replacedValue","",strong);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementreplaceexistingattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute.xhtml
new file mode 100644
index 0000000..650013e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementreplaceexistingattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue-expected.txt
new file mode 100644
index 0000000..1be56d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementreplaceexistingattributegevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue.js
new file mode 100644
index 0000000..0318918
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementreplaceexistingattributegevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+If the "setAttributeNode(newAttr)" method replaces an
+existing Attr node with the same name, then it should
+return the previously existing Attr node.
+
+Retrieve the last child of the third employee and add a
+new attribute node. The new attribute node is "class",
+which is already present in this Element. The method
+should return the existing Attr node(old "class" Attr).
+This test uses the "createAttribute(name)" method
+from the Document interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-887236154
+*/
+function hc_elementreplaceexistingattributegevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_elementreplaceexistingattributegevalue") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var newAttribute;
+ var streetAttr;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(2);
+ newAttribute = doc.createAttribute("class");
+ streetAttr = testEmployee.setAttributeNode(newAttribute);
+ assertNotNull("previousAttrNotNull",streetAttr);
+value = streetAttr.value;
+
+ assertEquals("previousAttrValue","No",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementreplaceexistingattributegevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue.xhtml
new file mode 100644
index 0000000..84cb2d0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementreplaceexistingattributegevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementreplaceexistingattributegevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes-expected.txt
new file mode 100644
index 0000000..e0cd55f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementretrieveallattributes
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes.js b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes.js
new file mode 100644
index 0000000..56c79ba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementretrieveallattributes";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Create a list of all the attributes of the last child
+ of the first "p" element by using the "getAttributes()"
+ method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2002Mar/0002.html
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=184
+*/
+function hc_elementretrieveallattributes() {
+ var success;
+ if(checkInitialization(builder, "hc_elementretrieveallattributes") != null) return;
+ var doc;
+ var addressList;
+ var testAddress;
+ var attributes;
+ var attribute;
+ var attributeName;
+ var actual = new Array();
+
+ htmlExpected = new Array();
+ htmlExpected[0] = "title";
+
+ expected = new Array();
+ expected[0] = "title";
+ expected[1] = "dir";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ addressList = doc.getElementsByTagName("acronym");
+ testAddress = addressList.item(0);
+ attributes = testAddress.attributes;
+
+ for(var indexN1006B = 0;indexN1006B < attributes.length; indexN1006B++) {
+ attribute = attributes.item(indexN1006B);
+ attributeName = attribute.nodeName;
+
+ actual[actual.length] = attributeName;
+
+ }
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ assertEqualsCollection("htmlAttributeNames",toLowerArray(htmlExpected),toLowerArray(actual));
+
+ }
+
+ else {
+ assertEqualsCollection("attributeNames",toLowerArray(expected),toLowerArray(actual));
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_elementretrieveallattributes();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes.xhtml
new file mode 100644
index 0000000..ac5f2cc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveallattributes.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementretrieveallattributes.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue-expected.txt
new file mode 100644
index 0000000..006a4d6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementretrieveattrvalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue.js b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue.js
new file mode 100644
index 0000000..288afcd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementretrieveattrvalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getAttribute(name)" method returns an attribute
+ value by name.
+
+ Retrieve the second address element, then
+ invoke the 'getAttribute("class")' method. This should
+ return the value of the attribute("No").
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-666EE0F9
+*/
+function hc_elementretrieveattrvalue() {
+ var success;
+ if(checkInitialization(builder, "hc_elementretrieveattrvalue") != null) return;
+ var doc;
+ var elementList;
+ var testAddress;
+ var attrValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(2);
+ attrValue = testAddress.getAttribute("class");
+ assertEquals("attrValue","No",attrValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementretrieveattrvalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue.xhtml
new file mode 100644
index 0000000..68cac37
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementretrieveattrvalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementretrieveattrvalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname-expected.txt
new file mode 100644
index 0000000..af443a0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementretrievetagname
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname.js b/LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname.js
new file mode 100644
index 0000000..9208b54
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementretrievetagname";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getElementsByTagName()" method returns a NodeList
+ of all descendant elements with a given tagName.
+
+ Invoke the "getElementsByTagName()" method and create
+ a NodeList of "code" elements. Retrieve the second
+ "code" element in the list and return the NodeName.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-104682815
+*/
+function hc_elementretrievetagname() {
+ var success;
+ if(checkInitialization(builder, "hc_elementretrievetagname") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var strong;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("code");
+ testEmployee = elementList.item(1);
+ strong = testEmployee.nodeName;
+
+ assertEqualsAutoCase("element", "nodename","code",strong);
+ strong = testEmployee.tagName;
+
+ assertEqualsAutoCase("element", "tagname","code",strong);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementretrievetagname();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname.xhtml
new file mode 100644
index 0000000..7909786
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementretrievetagname.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementretrievetagname.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull-expected.txt
new file mode 100644
index 0000000..e2d6a0d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementsetattributenodenull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull.js b/LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull.js
new file mode 100644
index 0000000..65db9d7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementsetattributenodenull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setAttributeNode(newAttr)" method returns the
+ null value if no previously existing Attr node with the
+ same name was replaced.
+
+ Retrieve the last child of the third employee and add a
+ new attribute to it. The new attribute node added is
+ "lang", which is not part of this Element. The
+ method should return the null value.
+ This test uses the "createAttribute(name)"
+ method from the Document interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-887236154
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_elementsetattributenodenull() {
+ var success;
+ if(checkInitialization(builder, "hc_elementsetattributenodenull") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var newAttribute;
+ var districtAttr;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(2);
+ newAttribute = doc.createAttribute("lang");
+ districtAttr = testEmployee.setAttributeNode(newAttribute);
+ assertNull("elementSetAttributeNodeNullAssert",districtAttr);
+
+}
+
+
+
+
+function runTest() {
+ hc_elementsetattributenodenull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull.xhtml
new file mode 100644
index 0000000..2cddc74
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementsetattributenodenull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementsetattributenodenull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr-expected.txt
new file mode 100644
index 0000000..86c1d64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementwrongdocumenterr
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr.js b/LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr.js
new file mode 100644
index 0000000..e17340c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr.js
@@ -0,0 +1,147 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementwrongdocumenterr";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setAttributeNode(newAttr)" method raises an
+ "WRONG_DOCUMENT_ERR DOMException if the "newAttr"
+ was created from a different document than the one that
+ created this document.
+
+ Retrieve the last employee and attempt to set a new
+ attribute node for its "employee" element. The new
+ attribute was created from a document other than the
+ one that created this element, therefore a
+ WRONG_DOCUMENT_ERR DOMException should be raised.
+
+ This test uses the "createAttribute(newAttr)" method
+ from the Document interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='WRONG_DOCUMENT_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-887236154
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-887236154')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='WRONG_DOCUMENT_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_elementwrongdocumenterr() {
+ var success;
+ if(checkInitialization(builder, "hc_elementwrongdocumenterr") != null) return;
+ var doc1;
+ var doc2;
+ var newAttribute;
+ var addressElementList;
+ var testAddress;
+ var attrAddress;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ newAttribute = doc2.createAttribute("newAttribute");
+ addressElementList = doc1.getElementsByTagName("acronym");
+ testAddress = addressElementList.item(4);
+
+ {
+ success = false;
+ try {
+ attrAddress = testAddress.setAttributeNode(newAttribute);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_elementwrongdocumenterr();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr.xhtml
new file mode 100644
index 0000000..2888bbb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_elementwrongdocumenterr.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_elementwrongdocumenterr.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1-expected.txt
new file mode 100644
index 0000000..468cfe6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_entitiesremovenameditem1
+Status failure
+Message entitiesNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1.js b/LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1.js
new file mode 100644
index 0000000..54ca9ff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_entitiesremovenameditem1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An attempt to add remove an entity should result in a NO_MODIFICATION_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1788794630
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D58B193
+*/
+function hc_entitiesremovenameditem1() {
+ var success;
+ if(checkInitialization(builder, "hc_entitiesremovenameditem1") != null) return;
+ var doc;
+ var entities;
+ var docType;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ if(
+
+ !(
+ (builder.contentType == "text/html")
+)
+
+ ) {
+ assertNotNull("docTypeNotNull",docType);
+entities = docType.entities;
+
+ assertNotNull("entitiesNotNull",entities);
+
+ {
+ success = false;
+ try {
+ retval = entities.removeNamedItem("alpha");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_entitiesremovenameditem1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1.xhtml
new file mode 100644
index 0000000..5ab47ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_entitiesremovenameditem1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_entitiesremovenameditem1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1-expected.txt
new file mode 100644
index 0000000..03f52ab
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_entitiessetnameditem1
+Status failure
+Message entitiesNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1.js b/LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1.js
new file mode 100644
index 0000000..17876c0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_entitiessetnameditem1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An attempt to add an element to the named node map returned by entities should
+result in a NO_MODIFICATION_ERR or HIERARCHY_REQUEST_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1788794630
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788
+*/
+function hc_entitiessetnameditem1() {
+ var success;
+ if(checkInitialization(builder, "hc_entitiessetnameditem1") != null) return;
+ var doc;
+ var entities;
+ var docType;
+ var retval;
+ var elem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ if(
+
+ !(
+ (builder.contentType == "text/html")
+)
+
+ ) {
+ assertNotNull("docTypeNotNull",docType);
+entities = docType.entities;
+
+ assertNotNull("entitiesNotNull",entities);
+elem = doc.createElement("br");
+
+ try {
+ retval = entities.setNamedItem(elem);
+ fail("throw_HIER_OR_NO_MOD_ERR");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* NO_MODIFICATION_ALLOWED_ERR */ 7 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_entitiessetnameditem1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1.xhtml
new file mode 100644
index 0000000..c065474
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_entitiessetnameditem1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_entitiessetnameditem1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange-expected.txt
new file mode 100644
index 0000000..03effee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapchildnoderange
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange.js
new file mode 100644
index 0000000..d70da8d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapchildnoderange";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Create a NamedNodeMap object from the attributes of the
+ last child of the third "p" element and traverse the
+ list from index 0 thru length -1. All indices should
+ be valid.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6D0FB19E
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=250
+*/
+function hc_namednodemapchildnoderange() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapchildnoderange") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attributes;
+ var child;
+ var strong;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(2);
+ attributes = testEmployee.attributes;
+
+ length = attributes.length;
+
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ assertEquals("htmlLength",2,length);
+
+ }
+
+ else {
+ assertEquals("length",3,length);
+ child = attributes.item(2);
+ assertNotNull("attr2",child);
+
+ }
+ child = attributes.item(0);
+ assertNotNull("attr0",child);
+child = attributes.item(1);
+ assertNotNull("attr1",child);
+child = attributes.item(3);
+ assertNull("attr3",child);
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapchildnoderange();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange.xhtml
new file mode 100644
index 0000000..cef1420
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapchildnoderange.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapchildnoderange.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem-expected.txt
new file mode 100644
index 0000000..a48aa6b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapgetnameditem
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem.js
new file mode 100644
index 0000000..3fa01c4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapgetnameditem";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the second "p" element and create a NamedNodeMap
+ listing of the attributes of the last child. Once the
+ list is created an invocation of the "getNamedItem(name)"
+ method is done with name="title". This should result
+ in the title Attr node being returned.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1074577549
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
+*/
+function hc_namednodemapgetnameditem() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapgetnameditem") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attributes;
+ var domesticAttr;
+ var attrName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(1);
+ attributes = testEmployee.attributes;
+
+ domesticAttr = attributes.getNamedItem("title");
+ attrName = domesticAttr.nodeName;
+
+ assertEqualsAutoCase("attribute", "nodeName","title",attrName);
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapgetnameditem();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem.xhtml
new file mode 100644
index 0000000..8e275d2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapgetnameditem.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapgetnameditem.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr-expected.txt
new file mode 100644
index 0000000..4f1f0aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapinuseattributeerr
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr.js
new file mode 100644
index 0000000..fdf0c15
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr.js
@@ -0,0 +1,139 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapinuseattributeerr";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "setNamedItem(arg)" method raises a
+INUSE_ATTRIBUTE_ERR DOMException if "arg" is an
+Attr that is already in an attribute of another Element.
+
+Create a NamedNodeMap object from the attributes of the
+last child of the third employee and attempt to add
+an attribute that is already being used by the first
+employee. This should raise the desired exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INUSE_ATTRIBUTE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-1025163788')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INUSE_ATTRIBUTE_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_namednodemapinuseattributeerr() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapinuseattributeerr") != null) return;
+ var doc;
+ var elementList;
+ var firstNode;
+ var testNode;
+ var attributes;
+ var domesticAttr;
+ var setAttr;
+ var setNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ firstNode = elementList.item(0);
+ domesticAttr = doc.createAttribute("title");
+ domesticAttr.value = "Yα";
+
+ setAttr = firstNode.setAttributeNode(domesticAttr);
+ elementList = doc.getElementsByTagName("acronym");
+ testNode = elementList.item(2);
+ attributes = testNode.attributes;
+
+
+ {
+ success = false;
+ try {
+ setNode = attributes.setNamedItem(domesticAttr);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 10);
+ }
+ assertTrue("throw_INUSE_ATTRIBUTE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapinuseattributeerr();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr.xhtml
new file mode 100644
index 0000000..19599b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapinuseattributeerr.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapinuseattributeerr.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr-expected.txt
new file mode 100644
index 0000000..257ccbf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapnotfounderr
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr.js
new file mode 100644
index 0000000..67467c3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapnotfounderr";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeNamedItem(name)" method raises a
+ NOT_FOUND_ERR DOMException if there is not a node
+ named "strong" in the map.
+
+ Create a NamedNodeMap object from the attributes of the
+ last child of the third employee and attempt to remove
+ the "lang" attribute. There is not a node named
+ "lang" in the list and therefore the desired
+ exception should be raised.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INUSE_ATTRIBUTE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D58B193
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-D58B193')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INUSE_ATTRIBUTE_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_namednodemapnotfounderr() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapnotfounderr") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attributes;
+ var removedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(2);
+ attributes = testEmployee.attributes;
+
+
+ {
+ success = false;
+ try {
+ removedNode = attributes.removeNamedItem("lang");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapnotfounderr();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr.xhtml
new file mode 100644
index 0000000..2d5dd1f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnotfounderr.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapnotfounderr.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes-expected.txt
new file mode 100644
index 0000000..788b0fd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapnumberofnodes
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes.js
new file mode 100644
index 0000000..b703b21
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapnumberofnodes";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the second "p" element and evaluate Node.attributes.length.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6D0FB19E
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=250
+*/
+function hc_namednodemapnumberofnodes() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapnumberofnodes") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attributes;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(2);
+ attributes = testEmployee.attributes;
+
+ length = attributes.length;
+
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ assertEquals("htmlLength",2,length);
+
+ }
+
+ else {
+ assertEquals("length",3,length);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapnumberofnodes();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes.xhtml
new file mode 100644
index 0000000..cdde20f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapnumberofnodes.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapnumberofnodes.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem-expected.txt
new file mode 100644
index 0000000..27050e0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapremovenameditem
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem.js
new file mode 100644
index 0000000..1370fa9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapremovenameditem";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeNamedItem(name)" method removes a node
+ specified by name.
+
+ Retrieve the third employee and create a NamedNodeMap
+ object of the attributes of the last child. Once the
+ list is created invoke the "removeNamedItem(name)"
+ method with name="class". This should result
+ in the removal of the specified attribute.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D58B193
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2002Mar/0002.html
+*/
+function hc_namednodemapremovenameditem() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapremovenameditem") != null) return;
+ var doc;
+ var elementList;
+ var newAttribute;
+ var testAddress;
+ var attributes;
+ var streetAttr;
+ var specified;
+ var removedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(2);
+ attributes = testAddress.attributes;
+
+ removedNode = attributes.removeNamedItem("class");
+ streetAttr = attributes.getNamedItem("class");
+ assertNull("isnull",streetAttr);
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapremovenameditem();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem.xhtml
new file mode 100644
index 0000000..3ce5639
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapremovenameditem.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapremovenameditem.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode-expected.txt
new file mode 100644
index 0000000..b516117
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapreturnattrnode
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode.js
new file mode 100644
index 0000000..bfb396b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapreturnattrnode";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the second p element and create a NamedNodeMap
+ listing of the attributes of the last child. Once the
+ list is created an invocation of the "getNamedItem(name)"
+ method is done with name="class". This should result
+ in the method returning an Attr node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1074577549
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1112119403
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+*/
+function hc_namednodemapreturnattrnode() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapreturnattrnode") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attributes;
+ var streetAttr;
+ var attrName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(1);
+ attributes = testEmployee.attributes;
+
+ streetAttr = attributes.getNamedItem("class");
+ assertInstanceOf("typeAssert","Attr",streetAttr);
+attrName = streetAttr.nodeName;
+
+ assertEqualsAutoCase("attribute", "nodeName","class",attrName);
+ attrName = streetAttr.name;
+
+ assertEqualsAutoCase("attribute", "name","class",attrName);
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapreturnattrnode();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode.xhtml
new file mode 100644
index 0000000..c51b8c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnattrnode.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapreturnattrnode.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem-expected.txt
new file mode 100644
index 0000000..3ef65d1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapreturnfirstitem
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem.js
new file mode 100644
index 0000000..9b17c3f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem.js
@@ -0,0 +1,150 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapreturnfirstitem";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "item(index)" method returns the indexth item in
+ the map(test for first item).
+
+ Retrieve the second "acronym" get the NamedNodeMap of the attributes. Since the
+ DOM does not specify an order of these nodes the contents
+ of the FIRST node can contain either "title", "class" or "dir".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=184
+*/
+function hc_namednodemapreturnfirstitem() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapreturnfirstitem") != null) return;
+ var doc;
+ var elementList;
+ var testAddress;
+ var attributes;
+ var child;
+ var nodeName;
+ htmlExpected = new Array();
+ htmlExpected[0] = "title";
+ htmlExpected[1] = "class";
+
+ expected = new Array();
+ expected[0] = "title";
+ expected[1] = "class";
+ expected[2] = "dir";
+
+ var actual = new Array();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(1);
+ attributes = testAddress.attributes;
+
+ for(var indexN10070 = 0;indexN10070 < attributes.length; indexN10070++) {
+ child = attributes.item(indexN10070);
+ nodeName = child.nodeName;
+
+ actual[actual.length] = nodeName;
+
+ }
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ assertEqualsCollection("attrName_html",toLowerArray(htmlExpected),toLowerArray(actual));
+
+ }
+
+ else {
+ assertEqualsCollection("attrName",expected,actual);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapreturnfirstitem();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem.xhtml
new file mode 100644
index 0000000..afeef2f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnfirstitem.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapreturnfirstitem.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem-expected.txt
new file mode 100644
index 0000000..f4fa312
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapreturnlastitem
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem.js
new file mode 100644
index 0000000..90422c8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem.js
@@ -0,0 +1,152 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapreturnlastitem";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "item(index)" method returns the indexth item in
+ the map(test for last item).
+
+ Retrieve the second "acronym" and get the attribute name. Since the
+ DOM does not specify an order of these nodes the contents
+ of the LAST node can contain either "title" or "class".
+ The test should return "true" if the LAST node is either
+ of these values.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=184
+*/
+function hc_namednodemapreturnlastitem() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapreturnlastitem") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attributes;
+ var child;
+ var nodeName;
+ htmlExpected = new Array();
+ htmlExpected[0] = "title";
+ htmlExpected[1] = "class";
+
+ expected = new Array();
+ expected[0] = "title";
+ expected[1] = "class";
+ expected[2] = "dir";
+
+ var actual = new Array();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(1);
+ attributes = testEmployee.attributes;
+
+ for(var indexN10070 = 0;indexN10070 < attributes.length; indexN10070++) {
+ child = attributes.item(indexN10070);
+ nodeName = child.nodeName;
+
+ actual[actual.length] = nodeName;
+
+ }
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ assertEqualsCollection("attrName_html",toLowerArray(htmlExpected),toLowerArray(actual));
+
+ }
+
+ else {
+ assertEqualsCollection("attrName",expected,actual);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapreturnlastitem();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem.xhtml
new file mode 100644
index 0000000..6e64643
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnlastitem.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapreturnlastitem.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull-expected.txt
new file mode 100644
index 0000000..e2bcc66
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapreturnnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull.js
new file mode 100644
index 0000000..04cb17e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapreturnnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getNamedItem(name)" method returns null of the
+ specified name did not identify any node in the map.
+
+ Retrieve the second employee and create a NamedNodeMap
+ listing of the attributes of the last child. Once the
+ list is created an invocation of the "getNamedItem(name)"
+ method is done with name="lang". This name does not
+ match any names in the list therefore the method should
+ return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1074577549
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_namednodemapreturnnull() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapreturnnull") != null) return;
+ var doc;
+ var elementList;
+ var testEmployee;
+ var attributes;
+ var districtNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testEmployee = elementList.item(1);
+ attributes = testEmployee.attributes;
+
+ districtNode = attributes.getNamedItem("lang");
+ assertNull("langAttrNull",districtNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapreturnnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull.xhtml
new file mode 100644
index 0000000..a666f51
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapreturnnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapreturnnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem-expected.txt
new file mode 100644
index 0000000..402640e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapsetnameditem
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem.js
new file mode 100644
index 0000000..ffba08a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapsetnameditem";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the second "p" element and create a NamedNodeMap
+ object from the attributes of the last child by
+ invoking the "getAttributes()" method. Once the
+ list is created an invocation of the "setNamedItem(arg)"
+ method is done with arg=newAttr, where newAttr is a
+ new Attr Node previously created. The "setNamedItem(arg)"
+ method should add then new node to the NamedNodeItem
+ object by using its "nodeName" attribute("lang').
+ This node is then retrieved using the "getNamedItem(name)"
+ method.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_namednodemapsetnameditem() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapsetnameditem") != null) return;
+ var doc;
+ var elementList;
+ var newAttribute;
+ var testAddress;
+ var attributes;
+ var districtNode;
+ var attrName;
+ var setNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(1);
+ newAttribute = doc.createAttribute("lang");
+ attributes = testAddress.attributes;
+
+ setNode = attributes.setNamedItem(newAttribute);
+ districtNode = attributes.getNamedItem("lang");
+ attrName = districtNode.nodeName;
+
+ assertEqualsAutoCase("attribute", "nodeName","lang",attrName);
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapsetnameditem();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem.xhtml
new file mode 100644
index 0000000..7982539
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditem.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapsetnameditem.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue-expected.txt
new file mode 100644
index 0000000..619494c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapsetnameditemreturnvalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue.js
new file mode 100644
index 0000000..0d82c40
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapsetnameditemreturnvalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the "setNamedItem(arg)" method replaces an already
+ existing node with the same name then the already
+ existing node is returned.
+
+ Retrieve the third employee and create a NamedNodeMap
+ object from the attributes of the last child by
+ invoking the "getAttributes()" method. Once the
+ list is created an invocation of the "setNamedItem(arg)"
+ method is done with arg=newAttr, where newAttr is a
+ new Attr Node previously created and whose node name
+ already exists in the map. The "setNamedItem(arg)"
+ method should replace the already existing node with
+ the new one and return the existing node.
+ This test uses the "createAttribute(name)" method from
+ the document interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9
+*/
+function hc_namednodemapsetnameditemreturnvalue() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapsetnameditemreturnvalue") != null) return;
+ var doc;
+ var elementList;
+ var newAttribute;
+ var testAddress;
+ var attributes;
+ var newNode;
+ var attrValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(2);
+ newAttribute = doc.createAttribute("class");
+ attributes = testAddress.attributes;
+
+ newNode = attributes.setNamedItem(newAttribute);
+ assertNotNull("previousAttrNotNull",newNode);
+attrValue = newNode.nodeValue;
+
+ assertEquals("previousAttrValue","No",attrValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapsetnameditemreturnvalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue.xhtml
new file mode 100644
index 0000000..3d23635
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemreturnvalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapsetnameditemreturnvalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists-expected.txt
new file mode 100644
index 0000000..26c6244
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapsetnameditemthatexists
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists.js
new file mode 100644
index 0000000..7ba88c4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapsetnameditemthatexists";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the node to be added by the "setNamedItem(arg)" method
+ already exists in the NamedNodeMap, it is replaced by
+ the new one.
+
+ Retrieve the second employee and create a NamedNodeMap
+ object from the attributes of the last child by
+ invoking the "getAttributes()" method. Once the
+ list is created an invocation of the "setNamedItem(arg)"
+ method is done with arg=newAttr, where newAttr is a
+ new Attr Node previously created and whose node name
+ already exists in the map. The "setNamedItem(arg)"
+ method should replace the already existing node with
+ the new one.
+ This node is then retrieved using the "getNamedItem(name)"
+ method. This test uses the "createAttribute(name)"
+ method from the document interface
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9
+*/
+function hc_namednodemapsetnameditemthatexists() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapsetnameditemthatexists") != null) return;
+ var doc;
+ var elementList;
+ var newAttribute;
+ var testAddress;
+ var attributes;
+ var districtNode;
+ var attrValue;
+ var setNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(1);
+ newAttribute = doc.createAttribute("class");
+ attributes = testAddress.attributes;
+
+ setNode = attributes.setNamedItem(newAttribute);
+ districtNode = attributes.getNamedItem("class");
+ attrValue = districtNode.nodeValue;
+
+ assertEquals("namednodemapSetNamedItemThatExistsAssert","",attrValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapsetnameditemthatexists();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists.xhtml
new file mode 100644
index 0000000..8443fba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemthatexists.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapsetnameditemthatexists.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue-expected.txt
new file mode 100644
index 0000000..a36311d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapsetnameditemwithnewvalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue.js
new file mode 100644
index 0000000..0ecee32
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapsetnameditemwithnewvalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the "setNamedItem(arg)" method does not replace an
+ existing node with the same name then it returns null.
+
+ Retrieve the third employee and create a NamedNodeMap
+ object from the attributes of the last child.
+ Once the list is created the "setNamedItem(arg)" method
+ is invoked with arg=newAttr, where newAttr is a
+ newly created Attr Node and whose node name
+ already exists in the map. The "setNamedItem(arg)"
+ method should add the new node and return null.
+ This test uses the "createAttribute(name)" method from
+ the document interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=243
+*/
+function hc_namednodemapsetnameditemwithnewvalue() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapsetnameditemwithnewvalue") != null) return;
+ var doc;
+ var elementList;
+ var newAttribute;
+ var testAddress;
+ var attributes;
+ var newNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddress = elementList.item(2);
+ newAttribute = doc.createAttribute("lang");
+ attributes = testAddress.attributes;
+
+ newNode = attributes.setNamedItem(newAttribute);
+ assertNull("prevValueNull",newNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapsetnameditemwithnewvalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue.xhtml
new file mode 100644
index 0000000..3246afd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapsetnameditemwithnewvalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapsetnameditemwithnewvalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr-expected.txt
new file mode 100644
index 0000000..ab021e2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapwrongdocumenterr
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr.js b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr.js
new file mode 100644
index 0000000..bde21e4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr.js
@@ -0,0 +1,149 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_namednodemapwrongdocumenterr";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "setNamedItem(arg)" method raises a
+ WRONG_DOCUMENT_ERR DOMException if "arg" was created
+ from a different document than the one that created
+ the NamedNodeMap.
+
+ Create a NamedNodeMap object from the attributes of the
+ last child of the third employee and attempt to add
+ another Attr node to it that was created from a
+ different DOM document. This should raise the desired
+ exception. This method uses the "createAttribute(name)"
+ method from the Document interface.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='WRONG_DOCUMENT_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-1025163788')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='WRONG_DOCUMENT_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_namednodemapwrongdocumenterr() {
+ var success;
+ if(checkInitialization(builder, "hc_namednodemapwrongdocumenterr") != null) return;
+ var doc1;
+ var doc2;
+ var elementList;
+ var testAddress;
+ var attributes;
+ var newAttribute;
+ var strong;
+ var setNode;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ elementList = doc1.getElementsByTagName("acronym");
+ testAddress = elementList.item(2);
+ newAttribute = doc2.createAttribute("newAttribute");
+ attributes = testAddress.attributes;
+
+
+ {
+ success = false;
+ try {
+ setNode = attributes.setNamedItem(newAttribute);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_namednodemapwrongdocumenterr();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr.xhtml
new file mode 100644
index 0000000..cd43d20
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_namednodemapwrongdocumenterr.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_namednodemapwrongdocumenterr.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild-expected.txt
new file mode 100644
index 0000000..dec90c1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchild
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild.js
new file mode 100644
index 0000000..0da5325
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchild";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the second "p" and append a "br" Element
+ node to the list of children. The last node in the list
+ is then retrieved and its NodeName examined. The
+ "getNodeName()" method should return "br".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodeappendchild() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeappendchild") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var createdNode;
+ var lchild;
+ var childName;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ createdNode = doc.createElement("br");
+ appendedChild = employeeNode.appendChild(createdNode);
+ lchild = employeeNode.lastChild;
+
+ childName = lchild.nodeName;
+
+ assertEqualsAutoCase("element", "nodeName","br",childName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeappendchild();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild.xhtml
new file mode 100644
index 0000000..0c4c919
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchild.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeappendchild.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists-expected.txt
new file mode 100644
index 0000000..7411c1d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildchildexists
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists.js
new file mode 100644
index 0000000..2c95d9f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists.js
@@ -0,0 +1,160 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildchildexists";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the "newChild" is already in the tree, it is first
+ removed before the new one is appended.
+
+ Retrieve the "em" second employee and
+ append the first child to the end of the list. After
+ the "appendChild(newChild)" method is invoked the first
+ child should be the one that was second and the last
+ child should be the one that was first.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodeappendchildchildexists() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeappendchildchildexists") != null) return;
+ var doc;
+ var elementList;
+ var childList;
+ var childNode;
+ var newChild;
+ var memberNode;
+ var memberName;
+ var refreshedActual = new Array();
+
+ var actual = new Array();
+
+ var nodeType;
+ expected = new Array();
+ expected[0] = "strong";
+ expected[1] = "code";
+ expected[2] = "sup";
+ expected[3] = "var";
+ expected[4] = "acronym";
+ expected[5] = "em";
+
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ childNode = elementList.item(1);
+ childList = childNode.getElementsByTagName("*");
+ newChild = childList.item(0);
+ appendedChild = childNode.appendChild(newChild);
+ for(var indexN10085 = 0;indexN10085 < childList.length; indexN10085++) {
+ memberNode = childList.item(indexN10085);
+ memberName = memberNode.nodeName;
+
+ actual[actual.length] = memberName;
+
+ }
+ assertEqualsListAutoCase("element", "liveByTagName",expected,actual);
+ childList = childNode.childNodes;
+
+ for(var indexN1009C = 0;indexN1009C < childList.length; indexN1009C++) {
+ memberNode = childList.item(indexN1009C);
+ nodeType = memberNode.nodeType;
+
+
+ if(
+ (1 == nodeType)
+ ) {
+ memberName = memberNode.nodeName;
+
+ refreshedActual[refreshedActual.length] = memberName;
+
+ }
+
+ }
+ assertEqualsListAutoCase("element", "refreshedChildNodes",expected,refreshedActual);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeappendchildchildexists();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists.xhtml
new file mode 100644
index 0000000..4253b70
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildchildexists.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeappendchildchildexists.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment-expected.txt
new file mode 100644
index 0000000..b41bd6f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchilddocfragment
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment.js
new file mode 100644
index 0000000..f1b95ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment.js
@@ -0,0 +1,158 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchilddocfragment";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the "newChild" is a DocumentFragment object then
+ all its content is added to the child list of this node.
+
+ Create and populate a new DocumentFragment object and
+ append it to the second employee. After the
+ "appendChild(newChild)" method is invoked retrieve the
+ new nodes at the end of the list, they should be the
+ two Element nodes from the DocumentFragment.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodeappendchilddocfragment() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeappendchilddocfragment") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var newdocFragment;
+ var newChild1;
+ var newChild2;
+ var child;
+ var childName;
+ var result = new Array();
+
+ var appendedChild;
+ var nodeType;
+ expected = new Array();
+ expected[0] = "em";
+ expected[1] = "strong";
+ expected[2] = "code";
+ expected[3] = "sup";
+ expected[4] = "var";
+ expected[5] = "acronym";
+ expected[6] = "br";
+ expected[7] = "b";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ newdocFragment = doc.createDocumentFragment();
+ newChild1 = doc.createElement("br");
+ newChild2 = doc.createElement("b");
+ appendedChild = newdocFragment.appendChild(newChild1);
+ appendedChild = newdocFragment.appendChild(newChild2);
+ appendedChild = employeeNode.appendChild(newdocFragment);
+ for(var indexN100A2 = 0;indexN100A2 < childList.length; indexN100A2++) {
+ child = childList.item(indexN100A2);
+ nodeType = child.nodeType;
+
+
+ if(
+ (1 == nodeType)
+ ) {
+ childName = child.nodeName;
+
+ result[result.length] = childName;
+
+ }
+
+ }
+ assertEqualsListAutoCase("element", "nodeNames",expected,result);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeappendchilddocfragment();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment.xhtml
new file mode 100644
index 0000000..82deee7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchilddocfragment.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeappendchilddocfragment.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename-expected.txt
new file mode 100644
index 0000000..33df1ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildgetnodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename.js
new file mode 100644
index 0000000..f7499c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildgetnodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "appendChild(newChild)" method returns the node
+ added.
+
+ Append a newly created node to the child list of the
+ second employee and check the NodeName returned. The
+ "getNodeName()" method should return "br".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodeappendchildgetnodename() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeappendchildgetnodename") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var newChild;
+ var appendNode;
+ var childName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ newChild = doc.createElement("br");
+ appendNode = employeeNode.appendChild(newChild);
+ childName = appendNode.nodeName;
+
+ assertEqualsAutoCase("element", "nodeName","br",childName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeappendchildgetnodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename.xhtml
new file mode 100644
index 0000000..64d1dee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildgetnodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeappendchildgetnodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype-expected.txt
new file mode 100644
index 0000000..59594bd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildinvalidnodetype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype.js
new file mode 100644
index 0000000..854d1c3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildinvalidnodetype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "appendChild(newChild)" method raises a
+ HIERARCHY_REQUEST_ERR DOMException if this node is of
+ a type that does not allow children of the type "newChild"
+ to be inserted.
+
+ Retrieve the root node and attempt to append a newly
+ created Attr node. An Element node cannot have children
+ of the "Attr" type, therefore the desired exception
+ should be raised.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-184E7107')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_nodeappendchildinvalidnodetype() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeappendchildinvalidnodetype") != null) return;
+ var doc;
+ var rootNode;
+ var newChild;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ rootNode = doc.documentElement;
+
+ newChild = doc.createAttribute("newAttribute");
+
+ {
+ success = false;
+ try {
+ appendedChild = rootNode.appendChild(newChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeappendchildinvalidnodetype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype.xhtml
new file mode 100644
index 0000000..25a92e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildinvalidnodetype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeappendchildinvalidnodetype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument-expected.txt
new file mode 100644
index 0000000..16ef8f1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnewchilddiffdocument
+Status failure
+Message throw_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument.js
new file mode 100644
index 0000000..1be650b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnewchilddiffdocument";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "appendChild(newChild)" method raises a
+ WRONG_DOCUMENT_ERR DOMException if the "newChild" was
+ created from a different document than the one that
+ created this node.
+
+ Retrieve the second employee and attempt to append
+ a node created from a different document. An attempt
+ to make such a replacement should raise the desired
+ exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-184E7107')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodeappendchildnewchilddiffdocument() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeappendchildnewchilddiffdocument") != null) return;
+ var doc1;
+ var doc2;
+ var newChild;
+ var elementList;
+ var elementNode;
+ var appendedChild;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ newChild = doc1.createElement("br");
+ elementList = doc2.getElementsByTagName("p");
+ elementNode = elementList.item(1);
+
+ {
+ success = false;
+ try {
+ appendedChild = elementNode.appendChild(newChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeappendchildnewchilddiffdocument();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument.xhtml
new file mode 100644
index 0000000..e4910f3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnewchilddiffdocument.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeappendchildnewchilddiffdocument.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor-expected.txt
new file mode 100644
index 0000000..8ec3a9c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnodeancestor
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor.js
new file mode 100644
index 0000000..a8ba817
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnodeancestor";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "appendChild(newChild)" method raises a
+ HIERARCHY_REQUEST_ERR DOMException if the node to
+ append is one of this node's ancestors.
+
+ Retrieve the second employee and attempt to append
+ an ancestor node(root node) to it.
+ An attempt to make such an addition should raise the
+ desired exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-184E7107')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+*/
+function hc_nodeappendchildnodeancestor() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeappendchildnodeancestor") != null) return;
+ var doc;
+ var newChild;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var oldChild;
+ var appendedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newChild = doc.documentElement;
+
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+
+ {
+ success = false;
+ try {
+ appendedChild = employeeNode.appendChild(newChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeappendchildnodeancestor();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor.xhtml
new file mode 100644
index 0000000..0f0432a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeappendchildnodeancestor.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeappendchildnodeancestor.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute-expected.txt
new file mode 100644
index 0000000..2f42466
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeattributenodeattribute
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute.js
new file mode 100644
index 0000000..e8443db
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeattributenodeattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getAttributes()" method invoked on an Attribute
+Node returns null.
+
+Retrieve the first attribute from the last child of the
+first employee and invoke the "getAttributes()" method
+on the Attribute Node. It should return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024
+*/
+function hc_nodeattributenodeattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeattributenodeattribute") != null) return;
+ var doc;
+ var elementList;
+ var testAddr;
+ var addrAttr;
+ var attrNode;
+ var attrList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddr = elementList.item(0);
+ addrAttr = testAddr.attributes;
+
+ attrNode = addrAttr.item(0);
+ attrList = attrNode.attributes;
+
+ assertNull("nodeAttributeNodeAttributeAssert1",attrList);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeattributenodeattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute.xhtml
new file mode 100644
index 0000000..da5425b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodeattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeattributenodeattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename-expected.txt
new file mode 100644
index 0000000..3cf1d6f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeattributenodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename.js
new file mode 100644
index 0000000..20b8e71
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeattributenodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the Attribute named "title" from the last
+ child of the first p element and check the string returned
+ by the "getNodeName()" method. It should be equal to
+ "title".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+*/
+function hc_nodeattributenodename() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeattributenodename") != null) return;
+ var doc;
+ var elementList;
+ var testAddr;
+ var addrAttr;
+ var attrName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddr = elementList.item(0);
+ addrAttr = testAddr.getAttributeNode("title");
+ attrName = addrAttr.nodeName;
+
+ assertEqualsAutoCase("attribute", "nodeName","title",attrName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeattributenodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename.xhtml
new file mode 100644
index 0000000..51b4ae1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeattributenodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype-expected.txt
new file mode 100644
index 0000000..2777338
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeattributenodetype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype.js
new file mode 100644
index 0000000..41d7f10
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeattributenodetype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+ The "getNodeType()" method for an Attribute Node
+
+ returns the constant value 2.
+
+
+
+ Retrieve the first attribute from the last child of
+
+ the first employee and invoke the "getNodeType()"
+
+ method. The method should return 2.
+
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558
+*/
+function hc_nodeattributenodetype() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeattributenodetype") != null) return;
+ var doc;
+ var elementList;
+ var testAddr;
+ var addrAttr;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddr = elementList.item(0);
+ addrAttr = testAddr.getAttributeNode("title");
+ nodeType = addrAttr.nodeType;
+
+ assertEquals("nodeAttrNodeTypeAssert1",2,nodeType);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeattributenodetype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype.xhtml
new file mode 100644
index 0000000..a34dc4a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodetype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeattributenodetype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue-expected.txt
new file mode 100644
index 0000000..0eecffe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeattributenodevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue.js
new file mode 100644
index 0000000..679a9dd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeattributenodevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+ The string returned by the "getNodeValue()" method for an
+ Attribute Node is the value of the Attribute.
+
+ Retrieve the Attribute named "title" from the last
+ child of the first "p" and check the string returned
+ by the "getNodeValue()" method. It should be equal to
+ "Yes".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+*/
+function hc_nodeattributenodevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeattributenodevalue") != null) return;
+ var doc;
+ var elementList;
+ var testAddr;
+ var addrAttr;
+ var attrValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddr = elementList.item(0);
+ addrAttr = testAddr.getAttributeNode("title");
+ attrValue = addrAttr.nodeValue;
+
+ assertEquals("nodeValue","Yes",attrValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeattributenodevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue.xhtml
new file mode 100644
index 0000000..ccfab5a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeattributenodevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeattributenodevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes-expected.txt
new file mode 100644
index 0000000..e28eec6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodechildnodes
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes.js b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes.js
new file mode 100644
index 0000000..855ec35
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes.js
@@ -0,0 +1,149 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodechildnodes";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+ The "getChildNodes()" method returns a NodeList
+ that contains all children of this node.
+
+ Retrieve the second employee and check the NodeList
+ returned by the "getChildNodes()" method. The
+ length of the list should be 13.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1451460987
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodechildnodes() {
+ var success;
+ if(checkInitialization(builder, "hc_nodechildnodes") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childNode;
+ var childNodes;
+ var nodeType;
+ var childName;
+ var actual = new Array();
+
+ expected = new Array();
+ expected[0] = "em";
+ expected[1] = "strong";
+ expected[2] = "code";
+ expected[3] = "sup";
+ expected[4] = "var";
+ expected[5] = "acronym";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childNodes = employeeNode.childNodes;
+
+ for(var indexN1006C = 0;indexN1006C < childNodes.length; indexN1006C++) {
+ childNode = childNodes.item(indexN1006C);
+ nodeType = childNode.nodeType;
+
+ childName = childNode.nodeName;
+
+
+ if(
+ (1 == nodeType)
+ ) {
+ actual[actual.length] = childName;
+
+ }
+
+ else {
+ assertEquals("textNodeType",3,nodeType);
+
+ }
+
+ }
+ assertEqualsListAutoCase("element", "elementNames",expected,actual);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodechildnodes();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes.xhtml
new file mode 100644
index 0000000..e79d252
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodes.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodechildnodes.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild-expected.txt
new file mode 100644
index 0000000..f8e7c60
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodechildnodesappendchild
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild.js b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild.js
new file mode 100644
index 0000000..a262e24
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild.js
@@ -0,0 +1,159 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodechildnodesappendchild";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The NodeList returned by the "getChildNodes()" method
+ is live. Changes on the node's children are immediately
+ reflected on the nodes returned in the NodeList.
+
+ Create a NodeList of the children of the second employee
+ and then add a newly created element that was created
+ by the "createElement()" method(Document Interface) to
+ the second employee by using the "appendChild()" method.
+ The length of the NodeList should reflect this new
+ addition to the child list. It should return the value 14.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1451460987
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodechildnodesappendchild() {
+ var success;
+ if(checkInitialization(builder, "hc_nodechildnodesappendchild") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var createdNode;
+ var childNode;
+ var childName;
+ var childType;
+ var textNode;
+ var actual = new Array();
+
+ expected = new Array();
+ expected[0] = "em";
+ expected[1] = "strong";
+ expected[2] = "code";
+ expected[3] = "sup";
+ expected[4] = "var";
+ expected[5] = "acronym";
+ expected[6] = "br";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ createdNode = doc.createElement("br");
+ employeeNode = employeeNode.appendChild(createdNode);
+ for(var indexN10087 = 0;indexN10087 < childList.length; indexN10087++) {
+ childNode = childList.item(indexN10087);
+ childName = childNode.nodeName;
+
+ childType = childNode.nodeType;
+
+
+ if(
+ (1 == childType)
+ ) {
+ actual[actual.length] = childName;
+
+ }
+
+ else {
+ assertEquals("textNodeType",3,childType);
+
+ }
+
+ }
+ assertEqualsListAutoCase("element", "childElements",expected,actual);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodechildnodesappendchild();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild.xhtml
new file mode 100644
index 0000000..c38c0cc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesappendchild.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodechildnodesappendchild.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty-expected.txt
new file mode 100644
index 0000000..c8fcedb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodechildnodesempty
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty.js b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty.js
new file mode 100644
index 0000000..612307c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodechildnodesempty";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getChildNodes()" method returns a NodeList
+ that contains all children of this node. If there
+ are not any children, this is a NodeList that does not
+ contain any nodes.
+
+ Retrieve the character data of the second "em" node and
+ invoke the "getChildNodes()" method. The
+ NodeList returned should not have any nodes.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1451460987
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodechildnodesempty() {
+ var success;
+ if(checkInitialization(builder, "hc_nodechildnodesempty") != null) return;
+ var doc;
+ var elementList;
+ var childList;
+ var employeeNode;
+ var textNode;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("em");
+ employeeNode = elementList.item(1);
+ textNode = employeeNode.firstChild;
+
+ childList = textNode.childNodes;
+
+ length = childList.length;
+
+ assertEquals("length_zero",0,length);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodechildnodesempty();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty.xhtml
new file mode 100644
index 0000000..93f87b4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodechildnodesempty.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodechildnodesempty.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied-expected.txt
new file mode 100644
index 0000000..045ab4f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecloneattributescopied
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied.js b/LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied.js
new file mode 100644
index 0000000..d753c4b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied.js
@@ -0,0 +1,149 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecloneattributescopied";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the second acronym element and invoke
+ the cloneNode method. The
+ duplicate node returned by the method should copy the
+ attributes associated with this node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=184
+*/
+function hc_nodecloneattributescopied() {
+ var success;
+ if(checkInitialization(builder, "hc_nodecloneattributescopied") != null) return;
+ var doc;
+ var elementList;
+ var addressNode;
+ var clonedNode;
+ var attributes;
+ var attributeNode;
+ var attributeName;
+ var result = new Array();
+
+ htmlExpected = new Array();
+ htmlExpected[0] = "class";
+ htmlExpected[1] = "title";
+
+ expected = new Array();
+ expected[0] = "class";
+ expected[1] = "title";
+ expected[2] = "dir";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ addressNode = elementList.item(1);
+ clonedNode = addressNode.cloneNode(false);
+ attributes = clonedNode.attributes;
+
+ for(var indexN10076 = 0;indexN10076 < attributes.length; indexN10076++) {
+ attributeNode = attributes.item(indexN10076);
+ attributeName = attributeNode.nodeName;
+
+ result[result.length] = attributeName;
+
+ }
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ assertEqualsCollection("nodeNames_html",toLowerArray(htmlExpected),toLowerArray(result));
+
+ }
+
+ else {
+ assertEqualsCollection("nodeNames",expected,result);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodecloneattributescopied();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied.xhtml
new file mode 100644
index 0000000..939d701
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecloneattributescopied.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodecloneattributescopied.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext-expected.txt
new file mode 100644
index 0000000..2128b64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonefalsenocopytext
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext.js
new file mode 100644
index 0000000..8d41464
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonefalsenocopytext";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "cloneNode(deep)" method does not copy text unless it
+ is deep cloned.(Test for deep=false)
+
+ Retrieve the fourth child of the second employee and
+ the "cloneNode(deep)" method with deep=false. The
+ duplicate node returned by the method should not copy
+ any text data contained in this node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3A0ED0A4
+*/
+function hc_nodeclonefalsenocopytext() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeclonefalsenocopytext") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var childNode;
+ var clonedNode;
+ var lastChildNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ childNode = childList.item(3);
+ clonedNode = childNode.cloneNode(false);
+ lastChildNode = clonedNode.lastChild;
+
+ assertNull("nodeCloneFalseNoCopyTextAssert1",lastChildNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeclonefalsenocopytext();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext.xhtml
new file mode 100644
index 0000000..ccad4ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonefalsenocopytext.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeclonefalsenocopytext.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull-expected.txt
new file mode 100644
index 0000000..04322dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonegetparentnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull.js
new file mode 100644
index 0000000..ab52c8a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonegetparentnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The duplicate node returned by the "cloneNode(deep)"
+ method does not have a ParentNode.
+
+ Retrieve the second employee and invoke the
+ "cloneNode(deep)" method with deep=false. The
+ duplicate node returned should return null when the
+ "getParentNode()" is invoked.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3A0ED0A4
+*/
+function hc_nodeclonegetparentnull() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeclonegetparentnull") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var clonedNode;
+ var parentNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ clonedNode = employeeNode.cloneNode(false);
+ parentNode = clonedNode.parentNode;
+
+ assertNull("nodeCloneGetParentNullAssert1",parentNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeclonegetparentnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull.xhtml
new file mode 100644
index 0000000..f34fefb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonegetparentnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeclonegetparentnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse-expected.txt
new file mode 100644
index 0000000..9977017
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonenodefalse
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse.js
new file mode 100644
index 0000000..7d48edf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonenodefalse";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "cloneNode(deep)" method returns a copy of the node
+ only if deep=false.
+
+ Retrieve the second employee and invoke the
+ "cloneNode(deep)" method with deep=false. The
+ method should only clone this node. The NodeName and
+ length of the NodeList are checked. The "getNodeName()"
+ method should return "employee" and the "getLength()"
+ method should return 0.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3A0ED0A4
+*/
+function hc_nodeclonenodefalse() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeclonenodefalse") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var clonedNode;
+ var cloneName;
+ var cloneChildren;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ clonedNode = employeeNode.cloneNode(false);
+ cloneName = clonedNode.nodeName;
+
+ assertEqualsAutoCase("element", "strong","p",cloneName);
+ cloneChildren = clonedNode.childNodes;
+
+ length = cloneChildren.length;
+
+ assertEquals("length",0,length);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeclonenodefalse();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse.xhtml
new file mode 100644
index 0000000..9a0f82a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodefalse.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeclonenodefalse.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue-expected.txt
new file mode 100644
index 0000000..6f0c0cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonenodetrue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue.js
new file mode 100644
index 0000000..5eba8cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue.js
@@ -0,0 +1,145 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonenodetrue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "cloneNode(deep)" method returns a copy of the node
+ and the subtree under it if deep=true.
+
+ Retrieve the second employee and invoke the
+ "cloneNode(deep)" method with deep=true. The
+ method should clone this node and the subtree under it.
+ The NodeName of each child in the returned node is
+ checked to insure the entire subtree under the second
+ employee was cloned.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3A0ED0A4
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodeclonenodetrue() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeclonenodetrue") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var clonedNode;
+ var clonedList;
+ var clonedChild;
+ var clonedChildName;
+ var origList;
+ var origChild;
+ var origChildName;
+ var result = new Array();
+
+ var expected = new Array();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ origList = employeeNode.childNodes;
+
+ for(var indexN10065 = 0;indexN10065 < origList.length; indexN10065++) {
+ origChild = origList.item(indexN10065);
+ origChildName = origChild.nodeName;
+
+ expected[expected.length] = origChildName;
+
+ }
+ clonedNode = employeeNode.cloneNode(true);
+ clonedList = clonedNode.childNodes;
+
+ for(var indexN1007B = 0;indexN1007B < clonedList.length; indexN1007B++) {
+ clonedChild = clonedList.item(indexN1007B);
+ clonedChildName = clonedChild.nodeName;
+
+ result[result.length] = clonedChildName;
+
+ }
+ assertEqualsList("clone",expected,result);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeclonenodetrue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue.xhtml
new file mode 100644
index 0000000..55c7e2b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonenodetrue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeclonenodetrue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext-expected.txt
new file mode 100644
index 0000000..1f0b18f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonetruecopytext
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext.js
new file mode 100644
index 0000000..c12370b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext.js
@@ -0,0 +1,121 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeclonetruecopytext";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "cloneNode(deep)" method does not copy text unless it
+ is deep cloned.(Test for deep=true)
+
+ Retrieve the eighth child of the second employee and
+ the "cloneNode(deep)" method with deep=true. The
+ duplicate node returned by the method should copy
+ any text data contained in this node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3A0ED0A4
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodeclonetruecopytext() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeclonetruecopytext") != null) return;
+ var doc;
+ var elementList;
+ var childNode;
+ var clonedNode;
+ var lastChildNode;
+ var childValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("sup");
+ childNode = elementList.item(1);
+ clonedNode = childNode.cloneNode(true);
+ lastChildNode = clonedNode.lastChild;
+
+ childValue = lastChildNode.nodeValue;
+
+ assertEquals("cloneContainsText","35,000",childValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeclonetruecopytext();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext.xhtml
new file mode 100644
index 0000000..28e1f26
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeclonetruecopytext.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeclonetruecopytext.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes-expected.txt
new file mode 100644
index 0000000..1ff1980
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecommentnodeattributes
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes.js b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes.js
new file mode 100644
index 0000000..7e3e2e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecommentnodeattributes";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getAttributes()" method invoked on a Comment
+ Node returns null.
+
+ Find any comment that is an immediate child of the root
+ and assert that Node.attributes is null. Then create
+ a new comment node (in case they had been omitted) and
+ make the assertion.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1728279322
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=248
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=263
+*/
+function hc_nodecommentnodeattributes() {
+ var success;
+ if(checkInitialization(builder, "hc_nodecommentnodeattributes") != null) return;
+ var doc;
+ var commentNode;
+ var nodeList;
+ var attrList;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ nodeList = doc.childNodes;
+
+ for(var indexN10043 = 0;indexN10043 < nodeList.length; indexN10043++) {
+ commentNode = nodeList.item(indexN10043);
+ nodeType = commentNode.nodeType;
+
+
+ if(
+ (8 == nodeType)
+ ) {
+ attrList = commentNode.attributes;
+
+ assertNull("existingCommentAttributesNull",attrList);
+
+ }
+
+ }
+ commentNode = doc.createComment("This is a comment");
+ attrList = commentNode.attributes;
+
+ assertNull("createdCommentAttributesNull",attrList);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodecommentnodeattributes();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes.xhtml
new file mode 100644
index 0000000..fb2d471
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodeattributes.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodecommentnodeattributes.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename-expected.txt
new file mode 100644
index 0000000..d5e4f71
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecommentnodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename.js b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename.js
new file mode 100644
index 0000000..de7013a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecommentnodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The string returned by the "getNodeName()" method for a
+ Comment Node is "#comment".
+
+ Retrieve the Comment node in the XML file
+ and check the string returned by the "getNodeName()"
+ method. It should be equal to "#comment".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1728279322
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=248
+*/
+function hc_nodecommentnodename() {
+ var success;
+ if(checkInitialization(builder, "hc_nodecommentnodename") != null) return;
+ var doc;
+ var elementList;
+ var commentNode;
+ var nodeType;
+ var commentName;
+ var commentNodeName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.childNodes;
+
+ for(var indexN10044 = 0;indexN10044 < elementList.length; indexN10044++) {
+ commentNode = elementList.item(indexN10044);
+ nodeType = commentNode.nodeType;
+
+
+ if(
+ (8 == nodeType)
+ ) {
+ commentNodeName = commentNode.nodeName;
+
+ assertEquals("existingNodeName","#comment",commentNodeName);
+
+ }
+
+ }
+ commentNode = doc.createComment("This is a comment");
+ commentNodeName = commentNode.nodeName;
+
+ assertEquals("createdNodeName","#comment",commentNodeName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodecommentnodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename.xhtml
new file mode 100644
index 0000000..616d5cd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodecommentnodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype-expected.txt
new file mode 100644
index 0000000..a1b0949
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecommentnodetype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype.js b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype.js
new file mode 100644
index 0000000..168b918
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecommentnodetype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getNodeType()" method for a Comment Node
+ returns the constant value 8.
+
+ Retrieve the nodes from the document and check for
+ a comment node and invoke the "getNodeType()" method. This should
+ return 8.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1728279322
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=248
+*/
+function hc_nodecommentnodetype() {
+ var success;
+ if(checkInitialization(builder, "hc_nodecommentnodetype") != null) return;
+ var doc;
+ var testList;
+ var commentNode;
+ var commentNodeName;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ testList = doc.childNodes;
+
+ for(var indexN10040 = 0;indexN10040 < testList.length; indexN10040++) {
+ commentNode = testList.item(indexN10040);
+ commentNodeName = commentNode.nodeName;
+
+
+ if(
+ ("#comment" == commentNodeName)
+ ) {
+ nodeType = commentNode.nodeType;
+
+ assertEquals("existingCommentNodeType",8,nodeType);
+
+ }
+
+ }
+ commentNode = doc.createComment("This is a comment");
+ nodeType = commentNode.nodeType;
+
+ assertEquals("createdCommentNodeType",8,nodeType);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodecommentnodetype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype.xhtml
new file mode 100644
index 0000000..8e99dd0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodetype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodecommentnodetype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue-expected.txt
new file mode 100644
index 0000000..67ec89a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecommentnodevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue.js
new file mode 100644
index 0000000..64e35b2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodecommentnodevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The string returned by the "getNodeValue()" method for a
+ Comment Node is the content of the comment.
+
+ Retrieve the comment in the XML file and
+ check the string returned by the "getNodeValue()" method.
+ It should be equal to "This is comment number 1".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1728279322
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=248
+*/
+function hc_nodecommentnodevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_nodecommentnodevalue") != null) return;
+ var doc;
+ var elementList;
+ var commentNode;
+ var commentName;
+ var commentValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.childNodes;
+
+ for(var indexN10040 = 0;indexN10040 < elementList.length; indexN10040++) {
+ commentNode = elementList.item(indexN10040);
+ commentName = commentNode.nodeName;
+
+
+ if(
+ ("#comment" == commentName)
+ ) {
+ commentValue = commentNode.nodeValue;
+
+ assertEquals("value"," This is comment number 1.",commentValue);
+
+ }
+
+ }
+ commentNode = doc.createComment(" This is a comment");
+ commentValue = commentNode.nodeValue;
+
+ assertEquals("createdCommentNodeValue"," This is a comment",commentValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodecommentnodevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue.xhtml
new file mode 100644
index 0000000..945c89a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodecommentnodevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodecommentnodevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename-expected.txt
new file mode 100644
index 0000000..ca32a37
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentfragmentnodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename.js b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename.js
new file mode 100644
index 0000000..4c3b8f2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentfragmentnodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The string returned by the "getNodeName()" method for a
+ DocumentFragment Node is "#document-frament".
+
+ Retrieve the DOM document and invoke the
+ "createDocumentFragment()" method and check the string
+ returned by the "getNodeName()" method. It should be
+ equal to "#document-fragment".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A3
+*/
+function hc_nodedocumentfragmentnodename() {
+ var success;
+ if(checkInitialization(builder, "hc_nodedocumentfragmentnodename") != null) return;
+ var doc;
+ var docFragment;
+ var documentFragmentName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFragment = doc.createDocumentFragment();
+ documentFragmentName = docFragment.nodeName;
+
+ assertEquals("nodeDocumentFragmentNodeNameAssert1","#document-fragment",documentFragmentName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodedocumentfragmentnodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename.xhtml
new file mode 100644
index 0000000..7e474fb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodedocumentfragmentnodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype-expected.txt
new file mode 100644
index 0000000..fc6cdc0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentfragmentnodetype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype.js b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype.js
new file mode 100644
index 0000000..404dcd4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentfragmentnodetype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getNodeType()" method for a DocumentFragment Node
+ returns the constant value 11.
+
+ Invoke the "createDocumentFragment()" method and
+ examine the NodeType of the document fragment
+ returned by the "getNodeType()" method. The method
+ should return 11.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A3
+*/
+function hc_nodedocumentfragmentnodetype() {
+ var success;
+ if(checkInitialization(builder, "hc_nodedocumentfragmentnodetype") != null) return;
+ var doc;
+ var documentFragmentNode;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ documentFragmentNode = doc.createDocumentFragment();
+ nodeType = documentFragmentNode.nodeType;
+
+ assertEquals("nodeDocumentFragmentNodeTypeAssert1",11,nodeType);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodedocumentfragmentnodetype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype.xhtml
new file mode 100644
index 0000000..fb84f01
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodetype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodedocumentfragmentnodetype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue-expected.txt
new file mode 100644
index 0000000..5552a7e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentfragmentnodevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue.js
new file mode 100644
index 0000000..3817faf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue.js
@@ -0,0 +1,120 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentfragmentnodevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The string returned by the "getNodeValue()" method for a
+ DocumentFragment Node is null.
+
+ Retrieve the DOM document and invoke the
+ "createDocumentFragment()" method and check the string
+ returned by the "getNodeValue()" method. It should be
+ equal to null.
+
+* @author Curt Arnold
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A3
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+*/
+function hc_nodedocumentfragmentnodevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_nodedocumentfragmentnodevalue") != null) return;
+ var doc;
+ var docFragment;
+ var attrList;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docFragment = doc.createDocumentFragment();
+ attrList = docFragment.attributes;
+
+ assertNull("attributesNull",attrList);
+ value = docFragment.nodeValue;
+
+ assertNull("initiallyNull",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodedocumentfragmentnodevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue.xhtml
new file mode 100644
index 0000000..705ba5f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentfragmentnodevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodedocumentfragmentnodevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute-expected.txt
new file mode 100644
index 0000000..ba88dca
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentnodeattribute
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute.js
new file mode 100644
index 0000000..0509317
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentnodeattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getAttributes()" method invoked on a Document
+Node returns null.
+
+Retrieve the DOM Document and invoke the
+"getAttributes()" method on the Document Node.
+It should return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#i-Document
+*/
+function hc_nodedocumentnodeattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_nodedocumentnodeattribute") != null) return;
+ var doc;
+ var attrList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ attrList = doc.attributes;
+
+ assertNull("doc_attributes_is_null",attrList);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodedocumentnodeattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute.xhtml
new file mode 100644
index 0000000..9d2e2cc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodeattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodedocumentnodeattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename-expected.txt
new file mode 100644
index 0000000..d8c73d1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentnodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename.js b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename.js
new file mode 100644
index 0000000..7cdef03
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename.js
@@ -0,0 +1,111 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentnodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The string returned by the "getNodeName()" method for a
+ Document Node is "#document".
+
+ Retrieve the DOM document and check the string returned
+ by the "getNodeName()" method. It should be equal to
+ "#document".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#i-Document
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+*/
+function hc_nodedocumentnodename() {
+ var success;
+ if(checkInitialization(builder, "hc_nodedocumentnodename") != null) return;
+ var doc;
+ var documentName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ documentName = doc.nodeName;
+
+ assertEquals("documentNodeName","#document",documentName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodedocumentnodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename.xhtml
new file mode 100644
index 0000000..e11e3ae
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodedocumentnodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype-expected.txt
new file mode 100644
index 0000000..308592e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentnodetype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype.js b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype.js
new file mode 100644
index 0000000..12ac065
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype.js
@@ -0,0 +1,110 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentnodetype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getNodeType()" method for a Document Node
+returns the constant value 9.
+
+Retrieve the document and invoke the "getNodeType()"
+method. The method should return 9.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#i-Document
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558
+*/
+function hc_nodedocumentnodetype() {
+ var success;
+ if(checkInitialization(builder, "hc_nodedocumentnodetype") != null) return;
+ var doc;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ nodeType = doc.nodeType;
+
+ assertEquals("nodeDocumentNodeTypeAssert1",9,nodeType);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodedocumentnodetype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype.xhtml
new file mode 100644
index 0000000..4ec4725
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodetype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodedocumentnodetype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue-expected.txt
new file mode 100644
index 0000000..8343b7e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentnodevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue.js
new file mode 100644
index 0000000..6cd8934
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodedocumentnodevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The string returned by the "getNodeValue()" method for a
+ Document Node is null.
+
+ Retrieve the DOM Document and check the string returned
+ by the "getNodeValue()" method. It should be equal to
+ null.
+
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#i-Document
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+*/
+function hc_nodedocumentnodevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_nodedocumentnodevalue") != null) return;
+ var doc;
+ var documentValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ documentValue = doc.nodeValue;
+
+ assertNull("documentNodeValue",documentValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodedocumentnodevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue.xhtml
new file mode 100644
index 0000000..8443ed4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodedocumentnodevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodedocumentnodevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes-expected.txt
new file mode 100644
index 0000000..5eba613
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeelementnodeattributes
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes.js
new file mode 100644
index 0000000..7046cdd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes.js
@@ -0,0 +1,145 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeelementnodeattributes";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the third "acronym" element and evaluate Node.attributes.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=236
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=184
+*/
+function hc_nodeelementnodeattributes() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeelementnodeattributes") != null) return;
+ var doc;
+ var elementList;
+ var testAddr;
+ var addrAttr;
+ var attrNode;
+ var attrName;
+ var attrList = new Array();
+
+ htmlExpected = new Array();
+ htmlExpected[0] = "title";
+ htmlExpected[1] = "class";
+
+ expected = new Array();
+ expected[0] = "title";
+ expected[1] = "class";
+ expected[2] = "dir";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddr = elementList.item(2);
+ addrAttr = testAddr.attributes;
+
+ for(var indexN10070 = 0;indexN10070 < addrAttr.length; indexN10070++) {
+ attrNode = addrAttr.item(indexN10070);
+ attrName = attrNode.nodeName;
+
+ attrList[attrList.length] = attrName;
+
+ }
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ assertEqualsCollection("attrNames_html",toLowerArray(htmlExpected),toLowerArray(attrList));
+
+ }
+
+ else {
+ assertEqualsCollection("attrNames",expected,attrList);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeelementnodeattributes();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes.xhtml
new file mode 100644
index 0000000..cbcc998
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodeattributes.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeelementnodeattributes.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename-expected.txt
new file mode 100644
index 0000000..24e9425
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeelementnodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename.js
new file mode 100644
index 0000000..693d23e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename.js
@@ -0,0 +1,125 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeelementnodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the first Element Node(Root Node) of the
+ DOM object and check the string returned by the
+ "getNodeName()" method. It should be equal to its
+ tagName.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=251
+*/
+function hc_nodeelementnodename() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeelementnodename") != null) return;
+ var doc;
+ var elementNode;
+ var elementName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementNode = doc.documentElement;
+
+ elementName = elementNode.nodeName;
+
+
+ if(
+
+ (builder.contentType == "image/svg+xml")
+
+ ) {
+ assertEquals("svgNodeName","svg",elementName);
+
+ }
+
+ else {
+ assertEqualsAutoCase("element", "nodeName","html",elementName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeelementnodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename.xhtml
new file mode 100644
index 0000000..be7a348
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeelementnodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype-expected.txt
new file mode 100644
index 0000000..09602b2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeelementnodetype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype.js
new file mode 100644
index 0000000..56dd936
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeelementnodetype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getNodeType()" method for an Element Node
+ returns the constant value 1.
+
+ Retrieve the root node and invoke the "getNodeType()"
+ method. The method should return 1.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558
+*/
+function hc_nodeelementnodetype() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeelementnodetype") != null) return;
+ var doc;
+ var rootNode;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ rootNode = doc.documentElement;
+
+ nodeType = rootNode.nodeType;
+
+ assertEquals("nodeElementNodeTypeAssert1",1,nodeType);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeelementnodetype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype.xhtml
new file mode 100644
index 0000000..45fe5c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodetype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeelementnodetype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue-expected.txt
new file mode 100644
index 0000000..bf16e70
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeelementnodevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue.js
new file mode 100644
index 0000000..29124cf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue.js
@@ -0,0 +1,109 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeelementnodevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The string returned by the "getNodeValue()" method for an
+ Element Node is null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+*/
+function hc_nodeelementnodevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeelementnodevalue") != null) return;
+ var doc;
+ var elementNode;
+ var elementValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementNode = doc.documentElement;
+
+ elementValue = elementNode.nodeValue;
+
+ assertNull("elementNodeValue",elementValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeelementnodevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue.xhtml
new file mode 100644
index 0000000..4f0d279
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeelementnodevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeelementnodevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild-expected.txt
new file mode 100644
index 0000000..db1de71
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetfirstchild
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild.js
new file mode 100644
index 0000000..a4681f0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetfirstchild";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getFirstChild()" method returns the first child
+ of this node.
+
+ Retrieve the second employee and invoke the
+ "getFirstChild()" method. The NodeName returned
+ should be "#text" or "EM".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-169727388
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodegetfirstchild() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetfirstchild") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var fchildNode;
+ var childName;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ fchildNode = employeeNode.firstChild;
+
+ childName = fchildNode.nodeName;
+
+
+ if(
+ ("#text" == childName)
+ ) {
+ assertEquals("firstChild_w_whitespace","#text",childName);
+
+ }
+
+ else {
+ assertEqualsAutoCase("element", "firstChild_wo_whitespace","em",childName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetfirstchild();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild.xhtml
new file mode 100644
index 0000000..4de3fff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchild.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetfirstchild.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull-expected.txt
new file mode 100644
index 0000000..d4716b9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetfirstchildnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull.js
new file mode 100644
index 0000000..dec151f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetfirstchildnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If there is not a first child then the "getFirstChild()"
+ method returns null.
+
+ Retrieve the text of the first "em" element and invoke the "getFirstChild()" method. It
+ should return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-169727388
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodegetfirstchildnull() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetfirstchildnull") != null) return;
+ var doc;
+ var emList;
+ var emNode;
+ var emText;
+ var nullChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ emList = doc.getElementsByTagName("em");
+ emNode = emList.item(0);
+ emText = emNode.firstChild;
+
+ nullChild = emText.firstChild;
+
+ assertNull("nullChild",nullChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetfirstchildnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull.xhtml
new file mode 100644
index 0000000..3ee51e8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetfirstchildnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetfirstchildnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild-expected.txt
new file mode 100644
index 0000000..9735829
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetlastchild
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild.js
new file mode 100644
index 0000000..712c5ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetlastchild";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getLastChild()" method returns the last child
+ of this node.
+
+ Retrieve the second employee and invoke the
+ "getLastChild()" method. The NodeName returned
+ should be "#text".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-61AD09FB
+*/
+function hc_nodegetlastchild() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetlastchild") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var lchildNode;
+ var childName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ lchildNode = employeeNode.lastChild;
+
+ childName = lchildNode.nodeName;
+
+ assertEquals("whitespace","#text",childName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetlastchild();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild.xhtml
new file mode 100644
index 0000000..6cf6a38
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchild.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetlastchild.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull-expected.txt
new file mode 100644
index 0000000..20b7918
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetlastchildnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull.js
new file mode 100644
index 0000000..9e5a6ad
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetlastchildnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+ If there is not a last child then the "getLastChild()"
+ method returns null.
+
+ Retrieve the text of the first "em" element and invoke the "getFirstChild()" method. It
+ should return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-61AD09FB
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodegetlastchildnull() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetlastchildnull") != null) return;
+ var doc;
+ var emList;
+ var emNode;
+ var emText;
+ var nullChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ emList = doc.getElementsByTagName("em");
+ emNode = emList.item(0);
+ emText = emNode.firstChild;
+
+ nullChild = emText.lastChild;
+
+ assertNull("nullChild",nullChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetlastchildnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull.xhtml
new file mode 100644
index 0000000..ad24b18
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetlastchildnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetlastchildnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling-expected.txt
new file mode 100644
index 0000000..6bbec51
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetnextsibling
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling.js
new file mode 100644
index 0000000..3daca44
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetnextsibling";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getNextSibling()" method returns the node immediately
+ following this node.
+
+ Retrieve the first child of the second employee and
+ invoke the "getNextSibling()" method. It should return
+ a node with the NodeName of "#text".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6AC54C2F
+*/
+function hc_nodegetnextsibling() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetnextsibling") != null) return;
+ var doc;
+ var elementList;
+ var emNode;
+ var nsNode;
+ var nsName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("em");
+ emNode = elementList.item(1);
+ nsNode = emNode.nextSibling;
+
+ nsName = nsNode.nodeName;
+
+ assertEquals("whitespace","#text",nsName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetnextsibling();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling.xhtml
new file mode 100644
index 0000000..9e10051
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsibling.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetnextsibling.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull-expected.txt
new file mode 100644
index 0000000..25a10d7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetnextsiblingnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull.js
new file mode 100644
index 0000000..0f9cb7b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetnextsiblingnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+ If there is not a node immediately following this node the
+
+ "getNextSibling()" method returns null.
+
+
+
+ Retrieve the first child of the second employee and
+
+ invoke the "getNextSibling()" method. It should
+
+ be set to null.
+
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6AC54C2F
+*/
+function hc_nodegetnextsiblingnull() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetnextsiblingnull") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var lcNode;
+ var nsNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ lcNode = employeeNode.lastChild;
+
+ nsNode = lcNode.nextSibling;
+
+ assertNull("nodeGetNextSiblingNullAssert1",nsNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetnextsiblingnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull.xhtml
new file mode 100644
index 0000000..fc134ef
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetnextsiblingnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetnextsiblingnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument-expected.txt
new file mode 100644
index 0000000..b9cf9f2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetownerdocument
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument.js
new file mode 100644
index 0000000..85853b8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetownerdocument";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+Evaluate Node.ownerDocument on the second "p" element.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#node-ownerDoc
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=251
+*/
+function hc_nodegetownerdocument() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetownerdocument") != null) return;
+ var doc;
+ var elementList;
+ var docNode;
+ var ownerDocument;
+ var docElement;
+ var elementName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ docNode = elementList.item(1);
+ ownerDocument = docNode.ownerDocument;
+
+ docElement = ownerDocument.documentElement;
+
+ elementName = docElement.nodeName;
+
+
+ if(
+
+ (builder.contentType == "image/svg+xml")
+
+ ) {
+ assertEquals("svgNodeName","svg",elementName);
+
+ }
+
+ else {
+ assertEqualsAutoCase("element", "ownerDocElemTagName","html",elementName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetownerdocument();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument.xhtml
new file mode 100644
index 0000000..5bb8020
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocument.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetownerdocument.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull-expected.txt
new file mode 100644
index 0000000..d4c2da3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetownerdocumentnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull.js
new file mode 100644
index 0000000..67bfd87
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull.js
@@ -0,0 +1,115 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetownerdocumentnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+ The "getOwnerDocument()" method returns null if the target
+
+ node itself is a document.
+
+
+
+ Invoke the "getOwnerDocument()" method on the master
+
+ document. The Document returned should be null.
+
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#node-ownerDoc
+*/
+function hc_nodegetownerdocumentnull() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetownerdocumentnull") != null) return;
+ var doc;
+ var ownerDocument;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ ownerDocument = doc.ownerDocument;
+
+ assertNull("nodeGetOwnerDocumentNullAssert1",ownerDocument);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetownerdocumentnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull.xhtml
new file mode 100644
index 0000000..dbe0061
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetownerdocumentnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetownerdocumentnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling-expected.txt
new file mode 100644
index 0000000..d33e378
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetprevioussibling
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling.js
new file mode 100644
index 0000000..5434f05
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetprevioussibling";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getPreviousSibling()" method returns the node
+ immediately preceding this node.
+
+ Retrieve the second child of the second employee and
+ invoke the "getPreviousSibling()" method. It should
+ return a node with a NodeName of "#text".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-640FB3C8
+*/
+function hc_nodegetprevioussibling() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetprevioussibling") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var psNode;
+ var psName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(1);
+ psNode = nameNode.previousSibling;
+
+ psName = psNode.nodeName;
+
+ assertEquals("whitespace","#text",psName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetprevioussibling();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling.xhtml
new file mode 100644
index 0000000..a093fee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussibling.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetprevioussibling.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull-expected.txt
new file mode 100644
index 0000000..2ff9a1b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetprevioussiblingnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull.js b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull.js
new file mode 100644
index 0000000..b1dc787
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetprevioussiblingnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+ If there is not a node immediately preceding this node the
+
+ "getPreviousSibling()" method returns null.
+
+
+
+ Retrieve the first child of the second employee and
+
+ invoke the "getPreviousSibling()" method. It should
+
+ be set to null.
+
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-640FB3C8
+*/
+function hc_nodegetprevioussiblingnull() {
+ var success;
+ if(checkInitialization(builder, "hc_nodegetprevioussiblingnull") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var fcNode;
+ var psNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(2);
+ fcNode = employeeNode.firstChild;
+
+ psNode = fcNode.previousSibling;
+
+ assertNull("nodeGetPreviousSiblingNullAssert1",psNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodegetprevioussiblingnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull.xhtml
new file mode 100644
index 0000000..4e6cfc0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodegetprevioussiblingnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodegetprevioussiblingnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes-expected.txt
new file mode 100644
index 0000000..59ae103
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodehaschildnodes
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes.js b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes.js
new file mode 100644
index 0000000..1ff38a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodehaschildnodes";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "hasChildNodes()" method returns true if the node
+ has children.
+
+ Retrieve the root node("staff") and invoke the
+ "hasChildNodes()" method. It should return the boolean
+ value "true".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-810594187
+*/
+function hc_nodehaschildnodes() {
+ var success;
+ if(checkInitialization(builder, "hc_nodehaschildnodes") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var state;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ state = employeeNode.hasChildNodes();
+ assertTrue("nodeHasChildAssert1",state);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodehaschildnodes();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes.xhtml
new file mode 100644
index 0000000..d8de482
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodes.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodehaschildnodes.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse-expected.txt
new file mode 100644
index 0000000..93be6aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodehaschildnodesfalse
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse.js b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse.js
new file mode 100644
index 0000000..f966eba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodehaschildnodesfalse";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "hasChildNodes()" method returns false if the node
+ does not have any children.
+
+ Retrieve the text of the first "em" element and invoke the "hasChildNodes()" method. It
+ should return false.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1451460987
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-810594187
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodehaschildnodesfalse() {
+ var success;
+ if(checkInitialization(builder, "hc_nodehaschildnodesfalse") != null) return;
+ var doc;
+ var emList;
+ var emNode;
+ var emText;
+ var hasChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ emList = doc.getElementsByTagName("em");
+ emNode = emList.item(0);
+ emText = emNode.firstChild;
+
+ hasChild = emText.hasChildNodes();
+ assertFalse("hasChild",hasChild);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodehaschildnodesfalse();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse.xhtml
new file mode 100644
index 0000000..0ea44a2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodehaschildnodesfalse.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodehaschildnodesfalse.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore-expected.txt
new file mode 100644
index 0000000..2df0b5b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbefore
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore.js
new file mode 100644
index 0000000..f73bd6d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore.js
@@ -0,0 +1,153 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbefore";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertBefore(newChild,refChild)" method inserts the
+ node "newChild" before the node "refChild".
+
+ Insert a newly created Element node before the second
+ sup element in the document and check the "newChild"
+ and "refChild" after insertion for correct placement.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=261
+*/
+function hc_nodeinsertbefore() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeinsertbefore") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var refChild;
+ var newChild;
+ var child;
+ var childName;
+ var insertedNode;
+ var actual = new Array();
+
+ expected = new Array();
+ expected[0] = "em";
+ expected[1] = "strong";
+ expected[2] = "code";
+ expected[3] = "br";
+ expected[4] = "sup";
+ expected[5] = "var";
+ expected[6] = "acronym";
+
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("sup");
+ refChild = elementList.item(2);
+ employeeNode = refChild.parentNode;
+
+ childList = employeeNode.childNodes;
+
+ newChild = doc.createElement("br");
+ insertedNode = employeeNode.insertBefore(newChild,refChild);
+ for(var indexN10091 = 0;indexN10091 < childList.length; indexN10091++) {
+ child = childList.item(indexN10091);
+ nodeType = child.nodeType;
+
+
+ if(
+ (1 == nodeType)
+ ) {
+ childName = child.nodeName;
+
+ actual[actual.length] = childName;
+
+ }
+
+ }
+ assertEqualsListAutoCase("element", "nodeNames",expected,actual);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeinsertbefore();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore.xhtml
new file mode 100644
index 0000000..9093844
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbefore.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeinsertbefore.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment-expected.txt
new file mode 100644
index 0000000..1eaa27b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforedocfragment
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment.js
new file mode 100644
index 0000000..1e132c9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment.js
@@ -0,0 +1,141 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforedocfragment";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the "newChild" is a DocumentFragment object then all
+ its children are inserted in the same order before the
+ the "refChild".
+
+ Create a DocumentFragment object and populate it with
+ two Element nodes. Retrieve the second employee and
+ insert the newly created DocumentFragment before its
+ fourth child. The second employee should now have two
+ extra children("newChild1" and "newChild2") at
+ positions fourth and fifth respectively.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodeinsertbeforedocfragment() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeinsertbeforedocfragment") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var refChild;
+ var newdocFragment;
+ var newChild1;
+ var newChild2;
+ var child;
+ var childName;
+ var appendedChild;
+ var insertedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ refChild = childList.item(3);
+ newdocFragment = doc.createDocumentFragment();
+ newChild1 = doc.createElement("br");
+ newChild2 = doc.createElement("b");
+ appendedChild = newdocFragment.appendChild(newChild1);
+ appendedChild = newdocFragment.appendChild(newChild2);
+ insertedNode = employeeNode.insertBefore(newdocFragment,refChild);
+ child = childList.item(3);
+ childName = child.nodeName;
+
+ assertEqualsAutoCase("element", "childName3","br",childName);
+ child = childList.item(4);
+ childName = child.nodeName;
+
+ assertEqualsAutoCase("element", "childName4","b",childName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeinsertbeforedocfragment();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment.xhtml
new file mode 100644
index 0000000..a76c650
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforedocfragment.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeinsertbeforedocfragment.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype-expected.txt
new file mode 100644
index 0000000..cd2ebc0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforeinvalidnodetype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype.js
new file mode 100644
index 0000000..e467f33
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype.js
@@ -0,0 +1,136 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforeinvalidnodetype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertBefore(newChild,refChild)" method raises a
+ HIERARCHY_REQUEST_ERR DOMException if this node is of
+ a type that does not allow children of the type "newChild"
+ to be inserted.
+
+ Retrieve the root node and attempt to insert a newly
+ created Attr node. An Element node cannot have children
+ of the "Attr" type, therefore the desired exception
+ should be raised.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-952280727')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=406
+*/
+function hc_nodeinsertbeforeinvalidnodetype() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeinsertbeforeinvalidnodetype") != null) return;
+ var doc;
+ var rootNode;
+ var newChild;
+ var elementList;
+ var refChild;
+ var insertedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newChild = doc.createAttribute("title");
+ elementList = doc.getElementsByTagName("p");
+ refChild = elementList.item(1);
+ rootNode = refChild.parentNode;
+
+
+ {
+ success = false;
+ try {
+ insertedNode = rootNode.insertBefore(newChild,refChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeinsertbeforeinvalidnodetype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype.xhtml
new file mode 100644
index 0000000..22834b4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforeinvalidnodetype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeinsertbeforeinvalidnodetype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument-expected.txt
new file mode 100644
index 0000000..8a0549a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchilddiffdocument
+Status failure
+Message throw_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument.js
new file mode 100644
index 0000000..915104f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument.js
@@ -0,0 +1,147 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchilddiffdocument";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertBefore(newChild,refChild)" method raises a
+ WRONG_DOCUMENT_ERR DOMException if the "newChild" was
+ created from a different document than the one that
+ created this node.
+
+ Retrieve the second employee and attempt to insert a new
+ child that was created from a different document than the
+ one that created the second employee. An attempt to
+ insert such a child should raise the desired exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='WRONG_DOCUMENT_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-952280727')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='WRONG_DOCUMENT_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodeinsertbeforenewchilddiffdocument() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeinsertbeforenewchilddiffdocument") != null) return;
+ var doc1;
+ var doc2;
+ var refChild;
+ var newChild;
+ var elementList;
+ var elementNode;
+ var insertedNode;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ newChild = doc1.createElement("br");
+ elementList = doc2.getElementsByTagName("p");
+ elementNode = elementList.item(1);
+ refChild = elementNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ insertedNode = elementNode.insertBefore(newChild,refChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeinsertbeforenewchilddiffdocument();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument.xhtml
new file mode 100644
index 0000000..9821966
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchilddiffdocument.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeinsertbeforenewchilddiffdocument.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists-expected.txt
new file mode 100644
index 0000000..4957e4a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchildexists
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists.js
new file mode 100644
index 0000000..f7adaff
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists.js
@@ -0,0 +1,151 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchildexists";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the "newChild" is already in the tree, the
+ "insertBefore(newChild,refChild)" method must first
+ remove it before the insertion takes place.
+
+ Insert a node Element ("em") that is already
+ present in the tree. The existing node should be
+ removed first and the new one inserted. The node is
+ inserted at a different position in the tree to assure
+ that it was indeed inserted.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodeinsertbeforenewchildexists() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeinsertbeforenewchildexists") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var refChild;
+ var newChild;
+ var child;
+ var childName;
+ var insertedNode;
+ expected = new Array();
+ expected[0] = "strong";
+ expected[1] = "code";
+ expected[2] = "sup";
+ expected[3] = "var";
+ expected[4] = "em";
+ expected[5] = "acronym";
+
+ var result = new Array();
+
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.getElementsByTagName("*");
+ refChild = childList.item(5);
+ newChild = childList.item(0);
+ insertedNode = employeeNode.insertBefore(newChild,refChild);
+ for(var indexN1008C = 0;indexN1008C < childList.length; indexN1008C++) {
+ child = childList.item(indexN1008C);
+ nodeType = child.nodeType;
+
+
+ if(
+ (1 == nodeType)
+ ) {
+ childName = child.nodeName;
+
+ result[result.length] = childName;
+
+ }
+
+ }
+ assertEqualsListAutoCase("element", "childNames",expected,result);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeinsertbeforenewchildexists();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists.xhtml
new file mode 100644
index 0000000..05db0e0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenewchildexists.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeinsertbeforenewchildexists.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor-expected.txt
new file mode 100644
index 0000000..b45fc67
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenodeancestor
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor.js
new file mode 100644
index 0000000..cd7c956
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenodeancestor";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertBefore(newChild,refChild)" method raises a
+ HIERARCHY_REQUEST_ERR DOMException if the node to be
+ inserted is one of this nodes ancestors.
+
+ Retrieve the second employee and attempt to insert a
+ node that is one of its ancestors(root node). An
+ attempt to insert such a node should raise the
+ desired exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-952280727')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+*/
+function hc_nodeinsertbeforenodeancestor() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeinsertbeforenodeancestor") != null) return;
+ var doc;
+ var newChild;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var refChild;
+ var insertedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newChild = doc.documentElement;
+
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ refChild = childList.item(0);
+
+ {
+ success = false;
+ try {
+ insertedNode = employeeNode.insertBefore(newChild,refChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeinsertbeforenodeancestor();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor.xhtml
new file mode 100644
index 0000000..2541847
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodeancestor.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeinsertbeforenodeancestor.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename-expected.txt
new file mode 100644
index 0000000..388fc85
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename.js
new file mode 100644
index 0000000..eeb61c8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertBefore(newChild,refchild)" method returns
+ the node being inserted.
+
+ Insert an Element node before the fourth
+ child of the second employee and check the node
+ returned from the "insertBefore(newChild,refChild)"
+ method. The node returned should be "newChild".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodeinsertbeforenodename() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeinsertbeforenodename") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var refChild;
+ var newChild;
+ var insertedNode;
+ var childName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ refChild = childList.item(3);
+ newChild = doc.createElement("br");
+ insertedNode = employeeNode.insertBefore(newChild,refChild);
+ childName = insertedNode.nodeName;
+
+ assertEqualsAutoCase("element", "nodeName","br",childName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeinsertbeforenodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename.xhtml
new file mode 100644
index 0000000..430f818
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforenodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeinsertbeforenodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent-expected.txt
new file mode 100644
index 0000000..93f63cf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforerefchildnonexistent
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent.js
new file mode 100644
index 0000000..d4c8f3e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforerefchildnonexistent";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "insertBefore(newChild,refChild)" method raises a
+ NOT_FOUND_ERR DOMException if the reference child is
+ not a child of this node.
+
+ Retrieve the second employee and attempt to insert a
+ new node before a reference node that is not a child
+ of this node. An attempt to insert before a non child
+ node should raise the desired exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-952280727')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_nodeinsertbeforerefchildnonexistent() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeinsertbeforerefchildnonexistent") != null) return;
+ var doc;
+ var refChild;
+ var newChild;
+ var elementList;
+ var elementNode;
+ var insertedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newChild = doc.createElement("br");
+ refChild = doc.createElement("b");
+ elementList = doc.getElementsByTagName("p");
+ elementNode = elementList.item(1);
+
+ {
+ success = false;
+ try {
+ insertedNode = elementNode.insertBefore(newChild,refChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeinsertbeforerefchildnonexistent();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent.xhtml
new file mode 100644
index 0000000..bbdcf3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnonexistent.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeinsertbeforerefchildnonexistent.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull-expected.txt
new file mode 100644
index 0000000..568ea26
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforerefchildnull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull.js
new file mode 100644
index 0000000..a0bf5e4
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforerefchildnull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the "refChild" is null then the
+ "insertBefore(newChild,refChild)" method inserts the
+ node "newChild" at the end of the list of children.
+
+ Retrieve the second employee and invoke the
+ "insertBefore(newChild,refChild)" method with
+ refChild=null. Since "refChild" is null the "newChild"
+ should be added to the end of the list. The last item
+ in the list is checked after insertion. The last Element
+ node of the list should be "newChild".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodeinsertbeforerefchildnull() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeinsertbeforerefchildnull") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var refChild = null;
+
+ var newChild;
+ var child;
+ var childName;
+ var insertedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ newChild = doc.createElement("br");
+ insertedNode = employeeNode.insertBefore(newChild,refChild);
+ child = employeeNode.lastChild;
+
+ childName = child.nodeName;
+
+ assertEqualsAutoCase("element", "nodeName","br",childName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeinsertbeforerefchildnull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull.xhtml
new file mode 100644
index 0000000..2e3164b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeinsertbeforerefchildnull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeinsertbeforerefchildnull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero-expected.txt
new file mode 100644
index 0000000..f332eea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistindexequalzero
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero.js b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero.js
new file mode 100644
index 0000000..eff64d9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistindexequalzero";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Create a list of all the children elements of the third
+ employee and access its first child by using an index
+ of 0. This should result in the whitspace before "em" being
+ selected (em when ignoring whitespace).
+ Further we evaluate its content(by using
+ the "getNodeName()" method) to ensure the proper
+ element was accessed.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-844377136
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodelistindexequalzero() {
+ var success;
+ if(checkInitialization(builder, "hc_nodelistindexequalzero") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var employeeList;
+ var child;
+ var childName;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(2);
+ employeeList = employeeNode.childNodes;
+
+ length = employeeList.length;
+
+ child = employeeList.item(0);
+ childName = child.nodeName;
+
+
+ if(
+ (13 == length)
+ ) {
+ assertEquals("childName_w_whitespace","#text",childName);
+
+ }
+
+ else {
+ assertEqualsAutoCase("element", "childName_wo_whitespace","em",childName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodelistindexequalzero();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero.xhtml
new file mode 100644
index 0000000..c9a79ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexequalzero.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodelistindexequalzero.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength-expected.txt
new file mode 100644
index 0000000..0f1a979
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistindexgetlength
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength.js b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength.js
new file mode 100644
index 0000000..d169a62
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistindexgetlength";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getLength()" method returns the number of nodes
+ in the list.
+
+ Create a list of all the children elements of the third
+ employee and invoke the "getLength()" method.
+ It should contain the value 13.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-203510337
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodelistindexgetlength() {
+ var success;
+ if(checkInitialization(builder, "hc_nodelistindexgetlength") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var employeeList;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(2);
+ employeeList = employeeNode.childNodes;
+
+ length = employeeList.length;
+
+
+ if(
+ (6 == length)
+ ) {
+ assertEquals("length_wo_space",6,length);
+
+ }
+
+ else {
+ assertEquals("length_w_space",13,length);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodelistindexgetlength();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength.xhtml
new file mode 100644
index 0000000..e1924a6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlength.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodelistindexgetlength.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist-expected.txt
new file mode 100644
index 0000000..6207f0e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistindexgetlengthofemptylist
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist.js b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist.js
new file mode 100644
index 0000000..9ae4969
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistindexgetlengthofemptylist";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getLength()" method returns the number of nodes
+ in the list.(Test for EMPTY list)
+
+ Create a list of all the children of the Text node
+ inside the first child of the third employee and
+ invoke the "getLength()" method. It should contain
+ the value 0.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-203510337
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodelistindexgetlengthofemptylist() {
+ var success;
+ if(checkInitialization(builder, "hc_nodelistindexgetlengthofemptylist") != null) return;
+ var doc;
+ var emList;
+ var emNode;
+ var textNode;
+ var textList;
+ var length;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ emList = doc.getElementsByTagName("em");
+ emNode = emList.item(2);
+ textNode = emNode.firstChild;
+
+ textList = textNode.childNodes;
+
+ length = textList.length;
+
+ assertEquals("length",0,length);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodelistindexgetlengthofemptylist();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist.xhtml
new file mode 100644
index 0000000..ab029ba
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexgetlengthofemptylist.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodelistindexgetlengthofemptylist.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero-expected.txt
new file mode 100644
index 0000000..1574b46
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistindexnotzero
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero.js b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero.js
new file mode 100644
index 0000000..8976e02
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistindexnotzero";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The items in the list are accessible via an integral
+ index starting from zero.
+ (Index not equal 0)
+
+ Create a list of all the children elements of the third
+ employee and access its fourth child by using an index
+ of 3 and calling getNodeName() which should return
+ "strong" (no whitespace) or "#text" (with whitespace).
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-844377136
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodelistindexnotzero() {
+ var success;
+ if(checkInitialization(builder, "hc_nodelistindexnotzero") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var employeeList;
+ var child;
+ var childName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(2);
+ employeeList = employeeNode.childNodes;
+
+ child = employeeList.item(3);
+ childName = child.nodeName;
+
+
+ if(
+ ("#text" == childName)
+ ) {
+ assertEquals("childName_space","#text",childName);
+
+ }
+
+ else {
+ assertEqualsAutoCase("element", "childName_strong","strong",childName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodelistindexnotzero();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero.xhtml
new file mode 100644
index 0000000..6bdb780
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistindexnotzero.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodelistindexnotzero.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem-expected.txt
new file mode 100644
index 0000000..219e4b5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistreturnfirstitem
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem.js b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem.js
new file mode 100644
index 0000000..117be61
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistreturnfirstitem";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Create a list of all the children elements of the third
+ employee and access its first child by invoking the
+ "item(index)" method with an index=0. This should
+ result in node with a nodeName of "#text" or "em".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-844377136
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodelistreturnfirstitem() {
+ var success;
+ if(checkInitialization(builder, "hc_nodelistreturnfirstitem") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var employeeList;
+ var child;
+ var childName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(2);
+ employeeList = employeeNode.childNodes;
+
+ child = employeeList.item(0);
+ childName = child.nodeName;
+
+
+ if(
+ ("#text" == childName)
+ ) {
+ assertEquals("nodeName_w_space","#text",childName);
+
+ }
+
+ else {
+ assertEqualsAutoCase("element", "nodeName_wo_space","em",childName);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodelistreturnfirstitem();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem.xhtml
new file mode 100644
index 0000000..bd78273
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnfirstitem.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodelistreturnfirstitem.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem-expected.txt
new file mode 100644
index 0000000..135ee72
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistreturnlastitem
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem.js b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem.js
new file mode 100644
index 0000000..b6652fe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelistreturnlastitem";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Create a list of all the children elements of the third
+ employee and access its last child by invoking the
+ "item(index)" method with an index=length-1. This should
+ result in node with nodeName="#text" or acronym.
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-844377136
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodelistreturnlastitem() {
+ var success;
+ if(checkInitialization(builder, "hc_nodelistreturnlastitem") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var employeeList;
+ var child;
+ var childName;
+ var index;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(2);
+ employeeList = employeeNode.childNodes;
+
+ index = employeeList.length;
+
+ index -= 1;
+child = employeeList.item(index);
+ childName = child.nodeName;
+
+
+ if(
+ (12 == index)
+ ) {
+ assertEquals("lastNodeName_w_whitespace","#text",childName);
+
+ }
+
+ else {
+ assertEqualsAutoCase("element", "lastNodeName","acronym",childName);
+ assertEquals("index",5,index);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodelistreturnlastitem();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem.xhtml
new file mode 100644
index 0000000..d6f6d4d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelistreturnlastitem.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodelistreturnlastitem.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist-expected.txt
new file mode 100644
index 0000000..491f8e9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelisttraverselist
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist.js b/LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist.js
new file mode 100644
index 0000000..dc6862b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist.js
@@ -0,0 +1,149 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodelisttraverselist";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The range of valid child node indices is 0 thru length -1
+
+ Create a list of all the children elements of the third
+ employee and traverse the list from index=0 thru
+ length -1.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-203510337
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-844377136
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodelisttraverselist() {
+ var success;
+ if(checkInitialization(builder, "hc_nodelisttraverselist") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var employeeList;
+ var child;
+ var childName;
+ var nodeType;
+ var result = new Array();
+
+ expected = new Array();
+ expected[0] = "em";
+ expected[1] = "strong";
+ expected[2] = "code";
+ expected[3] = "sup";
+ expected[4] = "var";
+ expected[5] = "acronym";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(2);
+ employeeList = employeeNode.childNodes;
+
+ for(var indexN10073 = 0;indexN10073 < employeeList.length; indexN10073++) {
+ child = employeeList.item(indexN10073);
+ nodeType = child.nodeType;
+
+ childName = child.nodeName;
+
+
+ if(
+ (1 == nodeType)
+ ) {
+ result[result.length] = childName;
+
+ }
+
+ else {
+ assertEquals("textNodeType",3,nodeType);
+ assertEquals("textNodeName","#text",childName);
+
+ }
+
+ }
+ assertEqualsListAutoCase("element", "nodeNames",expected,result);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodelisttraverselist();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist.xhtml
new file mode 100644
index 0000000..6744275
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodelisttraverselist.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodelisttraverselist.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode-expected.txt
new file mode 100644
index 0000000..98d175f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeparentnode
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode.js
new file mode 100644
index 0000000..e3408f6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode.js
@@ -0,0 +1,117 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeparentnode";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getParentNode()" method returns the parent
+ of this node.
+
+ Retrieve the second employee and invoke the
+ "getParentNode()" method on this node. It should
+ be set to "body".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1060184317
+*/
+function hc_nodeparentnode() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeparentnode") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var parentNode;
+ var parentName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ parentNode = employeeNode.parentNode;
+
+ parentName = parentNode.nodeName;
+
+ assertEqualsAutoCase("element", "parentNodeName","body",parentName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeparentnode();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode.xhtml
new file mode 100644
index 0000000..e80e740
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnode.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeparentnode.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull-expected.txt
new file mode 100644
index 0000000..32434d8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeparentnodenull
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull.js b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull.js
new file mode 100644
index 0000000..9c80de3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeparentnodenull";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "getParentNode()" method invoked on a node that has
+ just been created and not yet added to the tree is null.
+
+ Create a new "employee" Element node using the
+ "createElement(name)" method from the Document interface.
+ Since this new node has not yet been added to the tree,
+ the "getParentNode()" method will return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1060184317
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodeparentnodenull() {
+ var success;
+ if(checkInitialization(builder, "hc_nodeparentnodenull") != null) return;
+ var doc;
+ var createdNode;
+ var parentNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ createdNode = doc.createElement("br");
+ parentNode = createdNode.parentNode;
+
+ assertNull("parentNode",parentNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodeparentnodenull();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull.xhtml
new file mode 100644
index 0000000..3c7363b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodeparentnodenull.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodeparentnodenull.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechild-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechild-expected.txt
new file mode 100644
index 0000000..398bffe
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechild-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_noderemovechild
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechild.js b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechild.js
new file mode 100644
index 0000000..6db1b6a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechild.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_noderemovechild";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeChild(oldChild)" method removes the child node
+ indicated by "oldChild" from the list of children and
+ returns it.
+
+ Remove the first employee by invoking the
+ "removeChild(oldChild)" method an checking the
+ node returned by the "getParentNode()" method. It
+ should be set to null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1734834066
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_noderemovechild() {
+ var success;
+ if(checkInitialization(builder, "hc_noderemovechild") != null) return;
+ var doc;
+ var rootNode;
+ var childList;
+ var childToRemove;
+ var removedChild;
+ var parentNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ rootNode = doc.documentElement;
+
+ childList = rootNode.childNodes;
+
+//
+// WebKit modification: 9-October-2005
+//
+// Added the next two lines of code to remove first employee as
+// documented rather than removing the body element.
+// Workaround while waiting for <http://www.w3.org/Bugs/Public/show_bug.cgi?id=2334>.
+//
+ rootNode = childList.item(1);
+ childList = rootNode.childNodes;
+
+ childToRemove = childList.item(1);
+ removedChild = rootNode.removeChild(childToRemove);
+ parentNode = removedChild.parentNode;
+
+ assertNull("parentNodeNull",parentNode);
+
+}
+
+
+
+
+function runTest() {
+ hc_noderemovechild();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechild.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechild.xhtml
new file mode 100644
index 0000000..df8bf08
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechild.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_noderemovechild.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename-expected.txt
new file mode 100644
index 0000000..a386341
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_noderemovechildgetnodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename.js b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename.js
new file mode 100644
index 0000000..d81a2a9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename.js
@@ -0,0 +1,128 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_noderemovechildgetnodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeChild(oldChild)" method returns
+ the node being removed.
+
+ Remove the first child of the second employee
+ and check the NodeName returned by the
+ "removeChild(oldChild)" method. The returned node
+ should have a NodeName equal to "#text".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1734834066
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_noderemovechildgetnodename() {
+ var success;
+ if(checkInitialization(builder, "hc_noderemovechildgetnodename") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var oldChild;
+ var removedChild;
+ var childName;
+ var oldName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ oldChild = childList.item(0);
+ oldName = oldChild.nodeName;
+
+ removedChild = employeeNode.removeChild(oldChild);
+ assertNotNull("notnull",removedChild);
+childName = removedChild.nodeName;
+
+ assertEquals("nodeName",oldName,childName);
+
+}
+
+
+
+
+function runTest() {
+ hc_noderemovechildgetnodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename.xhtml
new file mode 100644
index 0000000..f6d68ad
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildgetnodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_noderemovechildgetnodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode-expected.txt
new file mode 100644
index 0000000..c2845b1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_noderemovechildnode
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode.js b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode.js
new file mode 100644
index 0000000..b6cef22
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode.js
@@ -0,0 +1,160 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_noderemovechildnode";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeChild(oldChild)" method removes the node
+ indicated by "oldChild".
+
+ Retrieve the second p element and remove its first child.
+ After the removal, the second p element should have 5 element
+ children and the first child should now be the child
+ that used to be at the second position in the list.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1734834066
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_noderemovechildnode() {
+ var success;
+ if(checkInitialization(builder, "hc_noderemovechildnode") != null) return;
+ var doc;
+ var elementList;
+ var emList;
+ var employeeNode;
+ var childList;
+ var oldChild;
+ var child;
+ var childName;
+ var length;
+ var removedChild;
+ var removedName;
+ var nodeType;
+ expected = new Array();
+ expected[0] = "strong";
+ expected[1] = "code";
+ expected[2] = "sup";
+ expected[3] = "var";
+ expected[4] = "acronym";
+
+ var actual = new Array();
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ emList = employeeNode.getElementsByTagName("em");
+ oldChild = emList.item(0);
+ removedChild = employeeNode.removeChild(oldChild);
+ removedName = removedChild.nodeName;
+
+ assertEqualsAutoCase("element", "removedName","em",removedName);
+ for(var indexN10098 = 0;indexN10098 < childList.length; indexN10098++) {
+ child = childList.item(indexN10098);
+ nodeType = child.nodeType;
+
+ childName = child.nodeName;
+
+
+ if(
+ (1 == nodeType)
+ ) {
+ actual[actual.length] = childName;
+
+ }
+
+ else {
+ assertEquals("textNodeType",3,nodeType);
+ assertEquals("textNodeName","#text",childName);
+
+ }
+
+ }
+ assertEqualsListAutoCase("element", "childNames",expected,actual);
+
+}
+
+
+
+
+function runTest() {
+ hc_noderemovechildnode();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode.xhtml
new file mode 100644
index 0000000..c49cba2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildnode.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_noderemovechildnode.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent-expected.txt
new file mode 100644
index 0000000..4b510aa
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_noderemovechildoldchildnonexistent
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent.js b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent.js
new file mode 100644
index 0000000..7f68dbd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent.js
@@ -0,0 +1,129 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_noderemovechildoldchildnonexistent";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "removeChild(oldChild)" method raises a
+ NOT_FOUND_ERR DOMException if the old child is
+ not a child of this node.
+
+ Retrieve the second employee and attempt to remove a
+ node that is not one of its children. An attempt to
+ remove such a node should raise the desired exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1734834066
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-1734834066')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1734834066
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_noderemovechildoldchildnonexistent() {
+ var success;
+ if(checkInitialization(builder, "hc_noderemovechildoldchildnonexistent") != null) return;
+ var doc;
+ var oldChild;
+ var elementList;
+ var elementNode;
+ var removedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ oldChild = doc.createElement("br");
+ elementList = doc.getElementsByTagName("p");
+ elementNode = elementList.item(1);
+
+ {
+ success = false;
+ try {
+ removedChild = elementNode.removeChild(oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_noderemovechildoldchildnonexistent();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent.xhtml
new file mode 100644
index 0000000..6ca8842
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_noderemovechildoldchildnonexistent.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_noderemovechildoldchildnonexistent.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild-expected.txt
new file mode 100644
index 0000000..a18217f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechild
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild.js b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild.js
new file mode 100644
index 0000000..db4ba3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild.js
@@ -0,0 +1,127 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechild";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceChild(newChild,oldChild)" method replaces
+ the node "oldChild" with the node "newChild".
+
+ Replace the first element of the second employee with
+ a newly created Element node. Check the first position
+ after the replacement operation is completed. The new
+ Element should be "newChild".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodereplacechild() {
+ var success;
+ if(checkInitialization(builder, "hc_nodereplacechild") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var oldChild;
+ var newChild;
+ var child;
+ var childName;
+ var replacedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ oldChild = childList.item(0);
+ newChild = doc.createElement("br");
+ replacedNode = employeeNode.replaceChild(newChild,oldChild);
+ child = childList.item(0);
+ childName = child.nodeName;
+
+ assertEqualsAutoCase("element", "nodeName","br",childName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodereplacechild();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild.xhtml
new file mode 100644
index 0000000..1964cee
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechild.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodereplacechild.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype-expected.txt
new file mode 100644
index 0000000..fa3cb86
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildinvalidnodetype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype.js b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype.js
new file mode 100644
index 0000000..789f5cf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype.js
@@ -0,0 +1,136 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildinvalidnodetype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceChild(newChild,oldChild)" method raises a
+ HIERARCHY_REQUEST_ERR DOMException if this node is of
+ a type that does not allow children of the type "newChild"
+ to be inserted.
+
+ Retrieve the root node and attempt to replace
+ one of its children with a newly created Attr node.
+ An Element node cannot have children of the "Attr"
+ type, therefore the desired exception should be raised.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-785887307')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=406
+*/
+function hc_nodereplacechildinvalidnodetype() {
+ var success;
+ if(checkInitialization(builder, "hc_nodereplacechildinvalidnodetype") != null) return;
+ var doc;
+ var rootNode;
+ var newChild;
+ var elementList;
+ var oldChild;
+ var replacedChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newChild = doc.createAttribute("lang");
+ elementList = doc.getElementsByTagName("p");
+ oldChild = elementList.item(1);
+ rootNode = oldChild.parentNode;
+
+
+ {
+ success = false;
+ try {
+ replacedChild = rootNode.replaceChild(newChild,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodereplacechildinvalidnodetype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype.xhtml
new file mode 100644
index 0000000..09b1d94
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildinvalidnodetype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodereplacechildinvalidnodetype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument-expected.txt
new file mode 100644
index 0000000..477e073
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnewchilddiffdocument
+Status failure
+Message throw_WRONG_DOCUMENT_ERR: assertTrue failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument.js b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument.js
new file mode 100644
index 0000000..23af319
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument.js
@@ -0,0 +1,147 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnewchilddiffdocument";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ docsLoaded += preload(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ docsLoaded += preload(doc2Ref, "doc2", "hc_staff");
+
+ if (docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 2) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceChild(newChild,oldChild)" method raises a
+ WRONG_DOCUMENT_ERR DOMException if the "newChild" was
+ created from a different document than the one that
+ created this node.
+
+ Retrieve the second employee and attempt to replace one
+ of its children with a node created from a different
+ document. An attempt to make such a replacement
+ should raise the desired exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-785887307')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodereplacechildnewchilddiffdocument() {
+ var success;
+ if(checkInitialization(builder, "hc_nodereplacechildnewchilddiffdocument") != null) return;
+ var doc1;
+ var doc2;
+ var oldChild;
+ var newChild;
+ var elementList;
+ var elementNode;
+ var replacedChild;
+
+ var doc1Ref = null;
+ if (typeof(this.doc1) != 'undefined') {
+ doc1Ref = this.doc1;
+ }
+ doc1 = load(doc1Ref, "doc1", "hc_staff");
+
+ var doc2Ref = null;
+ if (typeof(this.doc2) != 'undefined') {
+ doc2Ref = this.doc2;
+ }
+ doc2 = load(doc2Ref, "doc2", "hc_staff");
+ newChild = doc1.createElement("br");
+ elementList = doc2.getElementsByTagName("p");
+ elementNode = elementList.item(1);
+ oldChild = elementNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ replacedChild = elementNode.replaceChild(newChild,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+ }
+ assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodereplacechildnewchilddiffdocument();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument.xhtml
new file mode 100644
index 0000000..a5f4363
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchilddiffdocument.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodereplacechildnewchilddiffdocument.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists-expected.txt
new file mode 100644
index 0000000..c54d6a3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnewchildexists
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists.js b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists.js
new file mode 100644
index 0000000..06be50b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists.js
@@ -0,0 +1,155 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnewchildexists";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If the "newChild" is already in the tree, it is first
+ removed before the new one is added.
+
+ Retrieve the second "p" and replace "acronym" with its "em".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=246
+*/
+function hc_nodereplacechildnewchildexists() {
+ var success;
+ if(checkInitialization(builder, "hc_nodereplacechildnewchildexists") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var oldChild = null;
+
+ var newChild = null;
+
+ var child;
+ var childName;
+ var childNode;
+ var actual = new Array();
+
+ expected = new Array();
+ expected[0] = "strong";
+ expected[1] = "code";
+ expected[2] = "sup";
+ expected[3] = "var";
+ expected[4] = "em";
+
+ var replacedChild;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.getElementsByTagName("*");
+ newChild = childList.item(0);
+ oldChild = childList.item(5);
+ replacedChild = employeeNode.replaceChild(newChild,oldChild);
+ assertSame("return_value_same",oldChild,replacedChild);
+for(var indexN10094 = 0;indexN10094 < childList.length; indexN10094++) {
+ childNode = childList.item(indexN10094);
+ childName = childNode.nodeName;
+
+ nodeType = childNode.nodeType;
+
+
+ if(
+ (1 == nodeType)
+ ) {
+ actual[actual.length] = childName;
+
+ }
+
+ else {
+ assertEquals("textNodeType",3,nodeType);
+ assertEquals("textNodeName","#text",childName);
+
+ }
+
+ }
+ assertEqualsListAutoCase("element", "childNames",expected,actual);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodereplacechildnewchildexists();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists.xhtml
new file mode 100644
index 0000000..624010b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnewchildexists.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodereplacechildnewchildexists.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor-expected.txt
new file mode 100644
index 0000000..246dd3b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnodeancestor
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor.js b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor.js
new file mode 100644
index 0000000..5e7b044
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor.js
@@ -0,0 +1,135 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnodeancestor";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceChild(newChild,oldChild)" method raises a
+ HIERARCHY_REQUEST_ERR DOMException if the node to put
+ in is one of this node's ancestors.
+
+ Retrieve the second employee and attempt to replace
+ one of its children with an ancestor node(root node).
+ An attempt to make such a replacement should raise the
+ desired exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-785887307')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='HIERARCHY_REQUEST_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+*/
+function hc_nodereplacechildnodeancestor() {
+ var success;
+ if(checkInitialization(builder, "hc_nodereplacechildnodeancestor") != null) return;
+ var doc;
+ var newChild;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var oldChild;
+ var replacedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newChild = doc.documentElement;
+
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.childNodes;
+
+ oldChild = childList.item(0);
+
+ {
+ success = false;
+ try {
+ replacedNode = employeeNode.replaceChild(newChild,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 3);
+ }
+ assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodereplacechildnodeancestor();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor.xhtml
new file mode 100644
index 0000000..1fa1790
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodeancestor.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodereplacechildnodeancestor.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename-expected.txt
new file mode 100644
index 0000000..f623638
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename.js b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename.js
new file mode 100644
index 0000000..baeab8a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceChild(newChild,oldChild)" method returns
+ the node being replaced.
+
+ Replace the second Element of the second employee with
+ a newly created node Element and check the NodeName
+ returned by the "replaceChild(newChild,oldChild)"
+ method. The returned node should have a NodeName equal
+ to "em".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodereplacechildnodename() {
+ var success;
+ if(checkInitialization(builder, "hc_nodereplacechildnodename") != null) return;
+ var doc;
+ var elementList;
+ var employeeNode;
+ var childList;
+ var oldChild;
+ var newChild;
+ var replacedNode;
+ var childName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("p");
+ employeeNode = elementList.item(1);
+ childList = employeeNode.getElementsByTagName("em");
+ oldChild = childList.item(0);
+ newChild = doc.createElement("br");
+ replacedNode = employeeNode.replaceChild(newChild,oldChild);
+ childName = replacedNode.nodeName;
+
+ assertEqualsAutoCase("element", "replacedNodeName","em",childName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodereplacechildnodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename.xhtml
new file mode 100644
index 0000000..3c2b805
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildnodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodereplacechildnodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent-expected.txt
new file mode 100644
index 0000000..0a63f1a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildoldchildnonexistent
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent.js b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent.js
new file mode 100644
index 0000000..74ef15c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildoldchildnonexistent";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "replaceChild(newChild,oldChild)" method raises a
+ NOT_FOUND_ERR DOMException if the old child is
+ not a child of this node.
+
+ Retrieve the second employee and attempt to replace a
+ node that is not one of its children. An attempt to
+ replace such a node should raise the desired exception.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-785887307')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NOT_FOUND_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-785887307
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=247
+*/
+function hc_nodereplacechildoldchildnonexistent() {
+ var success;
+ if(checkInitialization(builder, "hc_nodereplacechildoldchildnonexistent") != null) return;
+ var doc;
+ var oldChild;
+ var newChild;
+ var elementList;
+ var elementNode;
+ var replacedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newChild = doc.createElement("br");
+ oldChild = doc.createElement("b");
+ elementList = doc.getElementsByTagName("p");
+ elementNode = elementList.item(1);
+
+ {
+ success = false;
+ try {
+ replacedNode = elementNode.replaceChild(newChild,oldChild);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodereplacechildoldchildnonexistent();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent.xhtml
new file mode 100644
index 0000000..1d327d3
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodereplacechildoldchildnonexistent.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodereplacechildoldchildnonexistent.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute-expected.txt
new file mode 100644
index 0000000..a49d493
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodetextnodeattribute
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute.js b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute.js
new file mode 100644
index 0000000..fd1f751
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodetextnodeattribute";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+The "getAttributes()" method invoked on a Text
+Node returns null.
+
+Retrieve the Text node from the last child of the
+first employee and invoke the "getAttributes()" method
+on the Text Node. It should return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1312295772
+*/
+function hc_nodetextnodeattribute() {
+ var success;
+ if(checkInitialization(builder, "hc_nodetextnodeattribute") != null) return;
+ var doc;
+ var elementList;
+ var testAddr;
+ var textNode;
+ var attrList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddr = elementList.item(0);
+ textNode = testAddr.firstChild;
+
+ attrList = textNode.attributes;
+
+ assertNull("text_attributes_is_null",attrList);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodetextnodeattribute();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute.xhtml
new file mode 100644
index 0000000..cb7a8db
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodeattribute.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodetextnodeattribute.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename-expected.txt
new file mode 100644
index 0000000..aa387f1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodetextnodename
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename.js b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename.js
new file mode 100644
index 0000000..bad6607
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename.js
@@ -0,0 +1,113 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodetextnodename";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The string returned by the "getNodeName()" method for a
+ Text Node is "#text".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095
+*/
+function hc_nodetextnodename() {
+ var success;
+ if(checkInitialization(builder, "hc_nodetextnodename") != null) return;
+ var doc;
+ var elementList;
+ var testAddr;
+ var textNode;
+ var textName;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddr = elementList.item(0);
+ textNode = testAddr.firstChild;
+
+ textName = textNode.nodeName;
+
+ assertEquals("textNodeName","#text",textName);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodetextnodename();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename.xhtml
new file mode 100644
index 0000000..e281a7b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodename.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodetextnodename.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype-expected.txt
new file mode 100644
index 0000000..ade4ce6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodetextnodetype
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype.js b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype.js
new file mode 100644
index 0000000..43c358d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodetextnodetype";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+
+ The "getNodeType()" method for a Text Node
+
+ returns the constant value 3.
+
+
+
+ Retrieve the Text node from the last child of
+
+ the first employee and invoke the "getNodeType()"
+
+ method. The method should return 3.
+
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-111237558
+*/
+function hc_nodetextnodetype() {
+ var success;
+ if(checkInitialization(builder, "hc_nodetextnodetype") != null) return;
+ var doc;
+ var elementList;
+ var testAddr;
+ var textNode;
+ var nodeType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddr = elementList.item(0);
+ textNode = testAddr.firstChild;
+
+ nodeType = textNode.nodeType;
+
+ assertEquals("nodeTextNodeTypeAssert1",3,nodeType);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodetextnodetype();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype.xhtml
new file mode 100644
index 0000000..927c8f2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodetype.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodetextnodetype.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue-expected.txt
new file mode 100644
index 0000000..ae6d76e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodetextnodevalue
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue.js b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue.js
new file mode 100644
index 0000000..1a1ec4b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue.js
@@ -0,0 +1,118 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodetextnodevalue";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The string returned by the "getNodeValue()" method for a
+ Text Node is the content of the Text node.
+
+ Retrieve the Text node from the last child of the first
+ employee and check the string returned by the
+ "getNodeValue()" method. It should be equal to
+ "1230 North Ave. Dallas, Texas 98551".
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+*/
+function hc_nodetextnodevalue() {
+ var success;
+ if(checkInitialization(builder, "hc_nodetextnodevalue") != null) return;
+ var doc;
+ var elementList;
+ var testAddr;
+ var textNode;
+ var textValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ testAddr = elementList.item(0);
+ textNode = testAddr.firstChild;
+
+ textValue = textNode.nodeValue;
+
+ assertEquals("textNodeValue","1230 North Ave. Dallas, Texas 98551",textValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodetextnodevalue();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue.xhtml
new file mode 100644
index 0000000..46b5b29
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodetextnodevalue.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodetextnodevalue.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue01-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue01-expected.txt
new file mode 100644
index 0000000..b8b40b8
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue01-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue01.js b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue01.js
new file mode 100644
index 0000000..c632b22
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue01.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue01";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An element is created, setNodeValue is called with a non-null argument, but getNodeValue
+should still return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#i-Document
+*/
+function hc_nodevalue01() {
+ var success;
+ if(checkInitialization(builder, "hc_nodevalue01") != null) return;
+ var doc;
+ var newNode;
+ var newValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newNode = doc.createElement("acronym");
+ newValue = newNode.nodeValue;
+
+ assertNull("initiallyNull",newValue);
+ newNode.nodeValue = "This should have no effect";
+
+ newValue = newNode.nodeValue;
+
+ assertNull("nullAfterAttemptedChange",newValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodevalue01();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue01.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue01.xhtml
new file mode 100644
index 0000000..cea27d2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue01.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodevalue01.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue02-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue02-expected.txt
new file mode 100644
index 0000000..cb2535a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue02-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue02.js b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue02.js
new file mode 100644
index 0000000..80682b9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue02.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue02";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An comment is created, setNodeValue is called with a non-null argument, but getNodeValue
+should still return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1728279322
+*/
+function hc_nodevalue02() {
+ var success;
+ if(checkInitialization(builder, "hc_nodevalue02") != null) return;
+ var doc;
+ var newNode;
+ var newValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newNode = doc.createComment("This is a new Comment node");
+ newValue = newNode.nodeValue;
+
+ assertEquals("initial","This is a new Comment node",newValue);
+ newNode.nodeValue = "This should have an effect";
+
+ newValue = newNode.nodeValue;
+
+ assertEquals("afterChange","This should have an effect",newValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodevalue02();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue02.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue02.xhtml
new file mode 100644
index 0000000..d479f49
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue02.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodevalue02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue03-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue03-expected.txt
new file mode 100644
index 0000000..63033db
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue03-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue03
+Status error
+Message Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue03.js b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue03.js
new file mode 100644
index 0000000..e61671a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue03.js
@@ -0,0 +1,138 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue03";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An entity reference is created, setNodeValue is called with a non-null argument, but getNodeValue
+should still return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-11C98490
+*/
+function hc_nodevalue03() {
+ var success;
+ if(checkInitialization(builder, "hc_nodevalue03") != null) return;
+ var doc;
+ var newNode;
+ var newValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+
+ {
+ success = false;
+ try {
+ newNode = doc.createEntityReference("ent1");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+ }
+ assertTrue("throw_NOT_SUPPORTED_ERR",success);
+ }
+
+ }
+
+ else {
+ newNode = doc.createEntityReference("ent1");
+ assertNotNull("createdEntRefNotNull",newNode);
+newValue = newNode.nodeValue;
+
+ assertNull("initiallyNull",newValue);
+ newNode.nodeValue = "This should have no effect";
+
+ newValue = newNode.nodeValue;
+
+ assertNull("nullAfterAttemptedChange",newValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodevalue03();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue03.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue03.xhtml
new file mode 100644
index 0000000..127651e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue03.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodevalue03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue04-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue04-expected.txt
new file mode 100644
index 0000000..f831754
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue04-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue04.js b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue04.js
new file mode 100644
index 0000000..40ceb64
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue04.js
@@ -0,0 +1,132 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue04";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An document type accessed, setNodeValue is called with a non-null argument, but getNodeValue
+should still return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A31
+*/
+function hc_nodevalue04() {
+ var success;
+ if(checkInitialization(builder, "hc_nodevalue04") != null) return;
+ var doc;
+ var newNode;
+ var newValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newNode = doc.doctype;
+
+ assertTrue("docTypeNotNullOrDocIsHTML",
+
+ (
+ (newNode != null)
+ ||
+ (builder.contentType == "text/html")
+)
+);
+
+ if(
+
+ (newNode != null)
+
+ ) {
+ assertNotNull("docTypeNotNull",newNode);
+newValue = newNode.nodeValue;
+
+ assertNull("initiallyNull",newValue);
+ newNode.nodeValue = "This should have no effect";
+
+ newValue = newNode.nodeValue;
+
+ assertNull("nullAfterAttemptedChange",newValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodevalue04();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue04.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue04.xhtml
new file mode 100644
index 0000000..0b60296
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue04.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodevalue04.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue05-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue05-expected.txt
new file mode 100644
index 0000000..5dfff02
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue05-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue05.js b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue05.js
new file mode 100644
index 0000000..34e2e33
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue05.js
@@ -0,0 +1,114 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue05";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+A document fragment is created, setNodeValue is called with a non-null argument, but getNodeValue
+should still return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A3
+*/
+function hc_nodevalue05() {
+ var success;
+ if(checkInitialization(builder, "hc_nodevalue05") != null) return;
+ var doc;
+ var newNode;
+ var newValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ newNode = doc.createDocumentFragment();
+ newValue = newNode.nodeValue;
+
+ assertNull("initiallyNull",newValue);
+ newNode.nodeValue = "This should have no effect";
+
+ newValue = newNode.nodeValue;
+
+ assertNull("nullAfterAttemptedChange",newValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodevalue05();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue05.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue05.xhtml
new file mode 100644
index 0000000..b04cbb7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue05.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodevalue05.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue06-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue06-expected.txt
new file mode 100644
index 0000000..b7cb6bb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue06-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue06.js b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue06.js
new file mode 100644
index 0000000..6cb9ac7
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue06.js
@@ -0,0 +1,112 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue06";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var newNodeRef = null;
+ if (typeof(this.newNode) != 'undefined') {
+ newNodeRef = this.newNode;
+ }
+ docsLoaded += preload(newNodeRef, "newNode", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An document is accessed, setNodeValue is called with a non-null argument, but getNodeValue
+should still return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#i-Document
+*/
+function hc_nodevalue06() {
+ var success;
+ if(checkInitialization(builder, "hc_nodevalue06") != null) return;
+ var newNode;
+ var newValue;
+
+ var newNodeRef = null;
+ if (typeof(this.newNode) != 'undefined') {
+ newNodeRef = this.newNode;
+ }
+ newNode = load(newNodeRef, "newNode", "hc_staff");
+ newValue = newNode.nodeValue;
+
+ assertNull("initiallyNull",newValue);
+ newNode.nodeValue = "This should have no effect";
+
+ newValue = newNode.nodeValue;
+
+ assertNull("nullAfterAttemptedChange",newValue);
+
+}
+
+
+
+
+function runTest() {
+ hc_nodevalue06();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue06.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue06.xhtml
new file mode 100644
index 0000000..5b7076c
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue06.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodevalue06.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue07-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue07-expected.txt
new file mode 100644
index 0000000..e372408
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue07-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue07
+Status failure
+Message entitiesNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue07.js b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue07.js
new file mode 100644
index 0000000..867a682
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue07.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue07";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An Entity is accessed, setNodeValue is called with a non-null argument, but getNodeValue
+should still return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-527DCFF2
+*/
+function hc_nodevalue07() {
+ var success;
+ if(checkInitialization(builder, "hc_nodevalue07") != null) return;
+ var doc;
+ var newNode;
+ var newValue;
+ var nodeMap;
+ var docType;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ if(
+
+ !(
+ (builder.contentType == "text/html")
+)
+
+ ) {
+ assertNotNull("docTypeNotNull",docType);
+nodeMap = docType.entities;
+
+ assertNotNull("entitiesNotNull",nodeMap);
+newNode = nodeMap.getNamedItem("alpha");
+ assertNotNull("entityNotNull",newNode);
+newValue = newNode.nodeValue;
+
+ assertNull("initiallyNull",newValue);
+ newNode.nodeValue = "This should have no effect";
+
+ newValue = newNode.nodeValue;
+
+ assertNull("nullAfterAttemptedChange",newValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodevalue07();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue07.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue07.xhtml
new file mode 100644
index 0000000..9585159
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue07.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodevalue07.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue08-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue08-expected.txt
new file mode 100644
index 0000000..491bb8f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue08-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue08
+Status failure
+Message notationsNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue08.js b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue08.js
new file mode 100644
index 0000000..6bbab84
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue08.js
@@ -0,0 +1,134 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodevalue08";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An notation is accessed, setNodeValue is called with a non-null argument, but getNodeValue
+should still return null.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-5431D1B9
+*/
+function hc_nodevalue08() {
+ var success;
+ if(checkInitialization(builder, "hc_nodevalue08") != null) return;
+ var doc;
+ var docType;
+ var newNode;
+ var newValue;
+ var nodeMap;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ if(
+
+ !(
+ (builder.contentType == "text/html")
+)
+
+ ) {
+ assertNotNull("docTypeNotNull",docType);
+nodeMap = docType.notations;
+
+ assertNotNull("notationsNotNull",nodeMap);
+newNode = nodeMap.getNamedItem("notation1");
+ assertNotNull("notationNotNull",newNode);
+newValue = newNode.nodeValue;
+
+ assertNull("initiallyNull",newValue);
+ newNode.nodeValue = "This should have no effect";
+
+ newValue = newNode.nodeValue;
+
+ assertNull("nullAfterAttemptedChange",newValue);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_nodevalue08();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_nodevalue08.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue08.xhtml
new file mode 100644
index 0000000..bc319ea
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_nodevalue08.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_nodevalue08.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1-expected.txt
new file mode 100644
index 0000000..8f3226d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_notationsremovenameditem1
+Status failure
+Message notationsNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1.js b/LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1.js
new file mode 100644
index 0000000..28d3cc6
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1.js
@@ -0,0 +1,133 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_notationsremovenameditem1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An attempt to add remove an notation should result in a NO_MODIFICATION_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D46829EF
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D58B193
+*/
+function hc_notationsremovenameditem1() {
+ var success;
+ if(checkInitialization(builder, "hc_notationsremovenameditem1") != null) return;
+ var doc;
+ var notations;
+ var docType;
+ var retval;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ if(
+
+ !(
+ (builder.contentType == "text/html")
+)
+
+ ) {
+ assertNotNull("docTypeNotNull",docType);
+notations = docType.notations;
+
+ assertNotNull("notationsNotNull",notations);
+
+ {
+ success = false;
+ try {
+ retval = notations.removeNamedItem("notation1");
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 7);
+ }
+ assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_notationsremovenameditem1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1.xhtml
new file mode 100644
index 0000000..f8f6b71
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_notationsremovenameditem1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_notationsremovenameditem1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1-expected.txt
new file mode 100644
index 0000000..bbf8686
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1-expected.txt
@@ -0,0 +1,3 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_notationssetnameditem1
+Status failure
+Message notationsNotNull: assertNotNull failed
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1.js b/LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1.js
new file mode 100644
index 0000000..0ae1333
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1.js
@@ -0,0 +1,144 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_notationssetnameditem1";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ checkFeature("XML", null);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+An attempt to add an element to the named node map returned by notations should
+result in a NO_MODIFICATION_ERR or HIERARCHY_REQUEST_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D46829EF
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1025163788
+*/
+function hc_notationssetnameditem1() {
+ var success;
+ if(checkInitialization(builder, "hc_notationssetnameditem1") != null) return;
+ var doc;
+ var notations;
+ var docType;
+ var retval;
+ var elem;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ docType = doc.doctype;
+
+
+ if(
+
+ !(
+ (builder.contentType == "text/html")
+)
+
+ ) {
+ assertNotNull("docTypeNotNull",docType);
+notations = docType.notations;
+
+ assertNotNull("notationsNotNull",notations);
+elem = doc.createElement("br");
+
+ try {
+ retval = notations.setNamedItem(elem);
+ fail("throw_HIER_OR_NO_MOD_ERR");
+
+ } catch (ex) {
+ if (typeof(ex.code) != 'undefined') {
+ switch(ex.code) {
+ case /* HIERARCHY_REQUEST_ERR */ 3 :
+ break;
+ case /* NO_MODIFICATION_ALLOWED_ERR */ 7 :
+ break;
+ default:
+ throw ex;
+ }
+ } else {
+ throw ex;
+ }
+ }
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_notationssetnameditem1();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1.xhtml
new file mode 100644
index 0000000..19021dd
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_notationssetnameditem1.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_notationssetnameditem1.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset-expected.txt
new file mode 100644
index 0000000..a11b8ca
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textindexsizeerrnegativeoffset
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset.js b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset.js
new file mode 100644
index 0000000..965648b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset.js
@@ -0,0 +1,130 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textindexsizeerrnegativeoffset";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+ setImplementationAttribute("signed", true);
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "splitText(offset)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset is
+ negative.
+
+ Retrieve the textual data from the second child of the
+ third employee and invoke the "splitText(offset)" method.
+ The desired exception should be raised since the offset
+ is a negative number.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-38853C1D
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-38853C1D')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function hc_textindexsizeerrnegativeoffset() {
+ var success;
+ if(checkInitialization(builder, "hc_textindexsizeerrnegativeoffset") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var textNode;
+ var splitNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(2);
+ textNode = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ splitNode = textNode.splitText(-69);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throws_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_textindexsizeerrnegativeoffset();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset.xhtml
new file mode 100644
index 0000000..7d6c078
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerrnegativeoffset.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_textindexsizeerrnegativeoffset.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds-expected.txt
new file mode 100644
index 0000000..a6050fb
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textindexsizeerroffsetoutofbounds
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds.js b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds.js
new file mode 100644
index 0000000..170d435
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds.js
@@ -0,0 +1,131 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textindexsizeerroffsetoutofbounds";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "splitText(offset)" method raises an
+ INDEX_SIZE_ERR DOMException if the specified offset is
+ greater than the number of characters in the Text node.
+
+ Retrieve the textual data from the second child of the
+ third employee and invoke the "splitText(offset)" method.
+ The desired exception should be raised since the offset
+ is a greater than the number of characters in the Text
+ node.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-38853C1D
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-38853C1D')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=249
+*/
+function hc_textindexsizeerroffsetoutofbounds() {
+ var success;
+ if(checkInitialization(builder, "hc_textindexsizeerroffsetoutofbounds") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var textNode;
+ var splitNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(2);
+ textNode = nameNode.firstChild;
+
+
+ {
+ success = false;
+ try {
+ splitNode = textNode.splitText(300);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("throw_INDEX_SIZE_ERR",success);
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_textindexsizeerroffsetoutofbounds();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds.xhtml
new file mode 100644
index 0000000..3710d87
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textindexsizeerroffsetoutofbounds.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_textindexsizeerroffsetoutofbounds.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements-expected.txt
new file mode 100644
index 0000000..fd2c1c0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textparseintolistofelements
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements.js b/LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements.js
new file mode 100644
index 0000000..71d362f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements.js
@@ -0,0 +1,169 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textparseintolistofelements";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ Retrieve the textual data from the last child of the
+ second employee. That node is composed of two
+ EntityReference nodes and two Text nodes. After
+ the content node is parsed, the "acronym" Element
+ should contain four children with each one of the
+ EntityReferences containing one child.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1451460987
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-11C98490
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-745549614
+*/
+function hc_textparseintolistofelements() {
+ var success;
+ if(checkInitialization(builder, "hc_textparseintolistofelements") != null) return;
+ var doc;
+ var elementList;
+ var addressNode;
+ var childList;
+ var child;
+ var value;
+ var grandChild;
+ var length;
+ var result = new Array();
+
+ expectedNormal = new Array();
+ expectedNormal[0] = "β";
+ expectedNormal[1] = " Dallas, ";
+ expectedNormal[2] = "γ";
+ expectedNormal[3] = "\n 98554";
+
+ expectedExpanded = new Array();
+ expectedExpanded[0] = "β Dallas, γ\n 98554";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ addressNode = elementList.item(1);
+ childList = addressNode.childNodes;
+
+ length = childList.length;
+
+ for(var indexN1007C = 0;indexN1007C < childList.length; indexN1007C++) {
+ child = childList.item(indexN1007C);
+ value = child.nodeValue;
+
+
+ if(
+
+ (value == null)
+
+ ) {
+ grandChild = child.firstChild;
+
+ assertNotNull("grandChildNotNull",grandChild);
+value = grandChild.nodeValue;
+
+ result[result.length] = value;
+
+ }
+
+ else {
+ result[result.length] = value;
+
+ }
+
+ }
+
+ if(
+ (1 == length)
+ ) {
+ assertEqualsList("assertEqCoalescing",expectedExpanded,result);
+
+ }
+
+ else {
+ assertEqualsList("assertEqNormal",expectedNormal,result);
+
+ }
+
+}
+
+
+
+
+function runTest() {
+ hc_textparseintolistofelements();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements.xhtml
new file mode 100644
index 0000000..e5ac1dc
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textparseintolistofelements.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_textparseintolistofelements.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour-expected.txt
new file mode 100644
index 0000000..c65b89b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textsplittextfour
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour.js b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour.js
new file mode 100644
index 0000000..ece64c2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textsplittextfour";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "splitText(offset)" method returns the new Text node.
+
+ Retrieve the textual data from the last child of the
+ first employee and invoke the "splitText(offset)" method.
+ The method should return the new Text node. The offset
+ value used for this test is 30. The "getNodeValue()"
+ method is called to check that the new node now contains
+ the characters at and after position 30.
+ (Starting count at 0)
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-38853C1D
+*/
+function hc_textsplittextfour() {
+ var success;
+ if(checkInitialization(builder, "hc_textsplittextfour") != null) return;
+ var doc;
+ var elementList;
+ var addressNode;
+ var textNode;
+ var splitNode;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("acronym");
+ addressNode = elementList.item(0);
+ textNode = addressNode.firstChild;
+
+ splitNode = textNode.splitText(30);
+ value = splitNode.nodeValue;
+
+ assertEquals("textSplitTextFourAssert","98551",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_textsplittextfour();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour.xhtml
new file mode 100644
index 0000000..6fe750b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextfour.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_textsplittextfour.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittextone-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextone-expected.txt
new file mode 100644
index 0000000..53b1e25
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextone-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textsplittextone
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittextone.js b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextone.js
new file mode 100644
index 0000000..2e089c5
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextone.js
@@ -0,0 +1,126 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textsplittextone";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ The "splitText(offset)" method breaks the Text node into
+ two Text nodes at the specified offset keeping each node
+ as siblings in the tree.
+
+ Retrieve the textual data from the second child of the
+ third employee and invoke the "splitText(offset)" method.
+ The method splits the Text node into two new sibling
+ Text nodes keeping both of them in the tree. This test
+ checks the "nextSibling()" method of the original node
+ to ensure that the two nodes are indeed siblings.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-38853C1D
+*/
+function hc_textsplittextone() {
+ var success;
+ if(checkInitialization(builder, "hc_textsplittextone") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var textNode;
+ var splitNode;
+ var secondPart;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(2);
+ textNode = nameNode.firstChild;
+
+ splitNode = textNode.splitText(7);
+ secondPart = textNode.nextSibling;
+
+ value = secondPart.nodeValue;
+
+ assertEquals("textSplitTextOneAssert","Jones",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_textsplittextone();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittextone.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextone.xhtml
new file mode 100644
index 0000000..034ba6b
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextone.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_textsplittextone.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree-expected.txt
new file mode 100644
index 0000000..3904f86
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textsplittextthree
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree.js b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree.js
new file mode 100644
index 0000000..6992628
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree.js
@@ -0,0 +1,124 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textsplittextthree";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ After the "splitText(offset)" method breaks the Text node
+ into two Text nodes, the new Text node contains all the
+ content at and after the offset point.
+
+ Retrieve the textual data from the second child of the
+ third employee and invoke the "splitText(offset)" method.
+ The new Text node should contain all the content
+ at and after the offset point. The "getNodeValue()"
+ method is called to check that the new node now contains
+ the characters at and after position seven.
+ (Starting count at 0)
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-38853C1D
+*/
+function hc_textsplittextthree() {
+ var success;
+ if(checkInitialization(builder, "hc_textsplittextthree") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var textNode;
+ var splitNode;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(2);
+ textNode = nameNode.firstChild;
+
+ splitNode = textNode.splitText(6);
+ value = splitNode.nodeValue;
+
+ assertEquals("textSplitTextThreeAssert"," Jones",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_textsplittextthree();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree.xhtml
new file mode 100644
index 0000000..5619b66
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittextthree.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_textsplittextthree.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo-expected.txt
new file mode 100644
index 0000000..ae70088
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textsplittexttwo
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo.js b/LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo.js
new file mode 100644
index 0000000..8778694
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo.js
@@ -0,0 +1,123 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textsplittexttwo";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ After the "splitText(offset)" method breaks the Text node
+ into two Text nodes, the original node contains all the
+ content up to the offset point.
+
+ Retrieve the textual data from the second child of the
+ third employee and invoke the "splitText(offset)" method.
+ The original Text node should contain all the content
+ up to the offset point. The "getNodeValue()" method
+ is called to check that the original node now contains
+ the first five characters.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-38853C1D
+*/
+function hc_textsplittexttwo() {
+ var success;
+ if(checkInitialization(builder, "hc_textsplittexttwo") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var textNode;
+ var splitNode;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(2);
+ textNode = nameNode.firstChild;
+
+ splitNode = textNode.splitText(5);
+ value = textNode.nodeValue;
+
+ assertEquals("textSplitTextTwoAssert","Roger",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_textsplittexttwo();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo.xhtml
new file mode 100644
index 0000000..955a589
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textsplittexttwo.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_textsplittexttwo.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup-expected.txt b/LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup-expected.txt
new file mode 100644
index 0000000..d70bda1
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup-expected.txt
@@ -0,0 +1,2 @@
+Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textwithnomarkup
+Status Success
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup.js b/LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup.js
new file mode 100644
index 0000000..2b3bae9
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup.js
@@ -0,0 +1,122 @@
+
+/*
+Copyright © 2001-2004 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+
+ /**
+ * Gets URI that identifies the test.
+ * @return uri identifier of test
+ */
+function getTargetURI() {
+ return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_textwithnomarkup";
+ }
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hc_staff");
+
+ if (docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+ If there is not any markup inside an Element or Attr node
+ content, then the text is contained in a single object
+ implementing the Text interface that is the only child
+ of the element.
+
+ Retrieve the textual data from the second child of the
+ third employee. That Text node contains a block of
+ multiple text lines without markup, so they should be
+ treated as a single Text node. The "getNodeValue()"
+ method should contain the combination of the two lines.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1312295772
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080
+*/
+function hc_textwithnomarkup() {
+ var success;
+ if(checkInitialization(builder, "hc_textwithnomarkup") != null) return;
+ var doc;
+ var elementList;
+ var nameNode;
+ var nodeV;
+ var value;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hc_staff");
+ elementList = doc.getElementsByTagName("strong");
+ nameNode = elementList.item(2);
+ nodeV = nameNode.firstChild;
+
+ value = nodeV.nodeValue;
+
+ assertEquals("textWithNoMarkupAssert","Roger\n Jones",value);
+
+}
+
+
+
+
+function runTest() {
+ hc_textwithnomarkup();
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup.xhtml b/LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup.xhtml
new file mode 100644
index 0000000..acb0f4f
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/hc_textwithnomarkup.xhtml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd" [
+ <!ENTITY alpha "&#945;">
+ <!ENTITY beta "&#946;">
+ <!ENTITY gamma "&#947;">
+ <!ENTITY delta "&#948;">
+ <!ENTITY epsilon "&#949;">
+ <!ENTITY alpha "&#950;">
+ <!NOTATION notation1 PUBLIC "notation1File">
+ <!NOTATION notation2 SYSTEM "notation2File">
+ <!ATTLIST acronym dir CDATA "ltr">
+]>
+<!-- This is comment number 1.-->
+<html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="hc_textwithnomarkup.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
+ <p>
+ <em>EMP0001</em>
+ <strong>Margaret Martin</strong>
+ <code>Accountant</code>
+ <sup>56,000</sup>
+ <var>Female</var>
+ <acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
+ </p>
+ <p>
+ <em>EMP0002</em>
+ <strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &amp;ent2;
+This is an adjacent CDATASection with a reference to a tab &amp;tab;</strong>
+ <code>Secretary</code>
+ <sup>35,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Yes">&beta; Dallas, &gamma;
+ 98554</acronym>
+ </p>
+ <p>
+ <em>EMP0003</em>
+ <strong>Roger
+ Jones</strong>
+ <code>Department Manager</code>
+ <sup>100,000</sup>
+ <var>&delta;</var>
+ <acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
+ </p>
+ <p>
+ <em>EMP0004</em>
+ <strong>Jeny Oconnor</strong>
+ <code>Personnel Director</code>
+ <sup>95,000</sup>
+ <var>Female</var>
+ <acronym title="Yes" class="Y&alpha;">27 South Road. Dallas, Texas 98556</acronym>
+ </p>
+ <p>
+ <em>EMP0005</em>
+ <strong>Robert Myers</strong>
+ <code>Computer Specialist</code>
+ <sup>90,000</sup>
+ <var>male</var>
+ <acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
+ </p>
+</body></html>
diff --git a/LayoutTests/dom/xhtml/level1/core/resources/COPYRIGHT.xhtml b/LayoutTests/dom/xhtml/level1/core/resources/COPYRIGHT.xhtml
new file mode 100644
index 0000000..ceca128
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/resources/COPYRIGHT.xhtml
@@ -0,0 +1,102 @@
+<?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>W3C IPR SOFTWARE NOTICE</title>
+ </head>
+ <body>
+ <h1>
+ W3C IPR SOFTWARE NOTICE
+ </h1>
+ <h3>
+ Copyright &#xA9; 2002-2005 <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved.
+ </h3>
+ <p>
+ The DOM Conformance Test Suite for Level 1 core is published under
+ the W3C Software Copyright Notice and License. The software
+ license requires "Notice of any changes or modifications to the
+ W3C files, including the date changes were made." Consequently,
+ modified versions of the DOM ECMAScript or Java tests must
+ document that they do not conform to the DOM Conformance Test
+ Suites; in the case of the Java language binding, the package
+ names can no longer be in the 'org.w3c' package.
+ </p>
+ <p>
+ <b>Note:</b> The original version of the W3C Software Copyright Notice
+ and License could be found at <a
+ href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
+ </p>
+ <h3>
+ Copyright &#xA9; 1994-2005 <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved. http://www.w3.org/Consortium/Legal/
+ </h3>
+ <p>
+ This W3C work (including software, documents, or other related items) is
+ being provided by the copyright holders under the following license. By
+ obtaining, using and/or copying this work, you (the licensee) agree that
+ you have read, understood, and will comply with the following terms and
+ conditions:
+ </p>
+ <p>
+ Permission to use, copy, and modify this software and its documentation,
+ with or without modification,&#xA0; for any purpose and without fee or
+ royalty is hereby granted, provided that you include the following on ALL
+ copies of the software and documentation or portions thereof, including
+ modifications, that you make:
+ </p>
+ <ol>
+ <li>
+ The full text of this NOTICE in a location viewable to users of the
+ redistributed or derivative work.
+ </li>
+ <li>
+ Any pre-existing intellectual property disclaimers, notices, or terms
+ and conditions. If none exist, a short notice of the following form
+ (hypertext is preferred, text is permitted) should be used within the
+ body of any redistributed or derivative code: "Copyright &#xA9;
+ [$date-of-software] <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved. http://www.w3.org/Consortium/Legal/"
+ </li>
+ <li>
+ Notice of any changes or modifications to the W3C files, including the
+ date changes were made. (We recommend you provide URIs to the location
+ from which the code is derived.)
+ </li>
+ </ol>
+ <p>
+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
+ HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
+ DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
+ TRADEMARKS OR OTHER RIGHTS.
+ </p>
+ <p>
+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+ CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+ DOCUMENTATION.
+ </p>
+ <p>
+ The name and trademarks of copyright holders may NOT be used in
+ advertising or publicity pertaining to the software without specific,
+ written prior permission. Title to copyright in this software and any
+ associated documentation will at all times remain with copyright
+ holders.
+ </p>
+ </body>
+</html>
diff --git a/LayoutTests/dom/xhtml/level1/core/selfxhtml.js b/LayoutTests/dom/xhtml/level1/core/selfxhtml.js
new file mode 100644
index 0000000..98a710a
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/selfxhtml.js
@@ -0,0 +1,743 @@
+/*
+Copyright (c) 2001-2005 World Wide Web Consortium,
+(Massachusetts Institute of Technology, European Research Consortium
+for Informatics and Mathematics, Keio University). All
+Rights Reserved. This work is distributed under the W3C(r) Software License [1] in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+ function assertSize(descr, expected, actual) {
+ var actualSize;
+ assertNotNull(descr, actual);
+ actualSize = actual.length;
+ assertEquals(descr, expected, actualSize);
+ }
+
+ function assertEqualsAutoCase(context, descr, expected, actual) {
+ if (builder.contentType == "text/html") {
+ if(context == "attribute") {
+ assertEquals(descr, expected.toLowerCase(), actual.toLowerCase());
+ } else {
+ assertEquals(descr, expected.toUpperCase(), actual);
+ }
+ } else {
+ assertEquals(descr, expected, actual);
+ }
+ }
+
+
+ function assertEqualsCollectionAutoCase(context, descr, expected, actual) {
+ //
+ // if they aren't the same size, they aren't equal
+ assertEquals(descr, expected.length, actual.length);
+
+ //
+ // 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) {
+ assert(descr + ": No match found for " + expectedValue,false);
+ }
+ if(matches > 1) {
+ assert(descr + ": Multiple matches found for " + expectedValue, false);
+ }
+ }
+ }
+
+ function assertEqualsCollection(descr, expected, actual) {
+ //
+ // if they aren't the same size, they aren't equal
+ assertEquals(descr, expected.length, actual.length);
+ //
+ // 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) {
+ assert(descr + ": No match found for " + expectedValue,false);
+ }
+ if(matches > 1) {
+ assert(descr + ": Multiple matches found for " + expectedValue, false);
+ }
+ }
+ }
+
+
+ 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
+ assertEquals(descr, expected.length, actual.length);
+ }
+
+
+ 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]) {
+ assertEquals(descr, expected[i], actual[i]);
+ }
+ }
+ //
+ // if they aren't the same size, they aren't equal
+ assertEquals(descr, expected.length, actual.length);
+ }
+
+ function assertInstanceOf(descr, type, obj) {
+ if(type == "Attr") {
+ assertEquals(descr,2,obj.nodeType);
+ var specd = obj.specified;
+ }
+ }
+
+ function assertSame(descr, expected, actual) {
+ if(expected != actual) {
+ assertEquals(descr, expected.nodeType, actual.nodeType);
+ assertEquals(descr, expected.nodeValue, actual.nodeValue);
+ }
+ }
+
+ function assertURIEquals(assertID, scheme, path, host, file, name, query, fragment, isAbsolute, actual) {
+ //
+ // URI must be non-null
+ assertNotNull(assertID, actual);
+
+ 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) assertEquals(assertID,fragment, actualFragment);
+
+ 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) assertEquals(assertID, query, actualQuery);
+
+ 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) {
+ assertEquals(assertID, scheme, actualScheme);
+ }
+
+ if(path != null) {
+ assertEquals(assertID, path, actualPath);
+ }
+
+ if(host != null) {
+ var actualHost = "";
+ if(actualPath.substring(0,2) == "//") {
+ var termSlash = actualPath.substring(2).indexOf("/") + 2;
+ actualHost = actualPath.substring(0,termSlash);
+ }
+ assertEquals(assertID, host, actualHost);
+ }
+
+ if(file != null || name != null) {
+ var actualFile = actualPath;
+ var finalSlash = actualPath.lastIndexOf("/");
+ if(finalSlash != -1) {
+ actualFile = actualPath.substring(finalSlash+1);
+ }
+ if (file != null) {
+ assertEquals(assertID, file, actualFile);
+ }
+ if (name != null) {
+ var actualName = actualFile;
+ var finalDot = actualFile.lastIndexOf(".");
+ if (finalDot != -1) {
+ actualName = actualName.substring(0, finalDot);
+ }
+ assertEquals(assertID, name, actualName);
+ }
+ }
+
+ if(isAbsolute != null) {
+ assertEquals(assertID, isAbsolute, actualPath.substring(0,1) == "/");
+ }
+ }
+
+
+// size() used by assertSize element
+function size(collection)
+{
+ return collection.length;
+}
+
+function same(expected, actual)
+{
+ return expected === actual;
+}
+
+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 toLowerArray(src) {
+ var newArray = new Array();
+ var i;
+ for (i = 0; i < src.length; i++) {
+ newArray[i] = src[i].toLowerCase();
+ }
+ return newArray;
+}
+
+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 < this.allErrors.length; i++) {
+ if (this.allErrors[i].severity >= severity) {
+ assertEquals(id, severity - 1, this.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[userDataMonitor.allNotifications.length] =
+ new UserDataNotification(operation, key, data, src, dst);
+}
+
+
+
+function HTMLBuilder() {
+ this.contentType = "application/xhtml+xml";
+ this.supportedContentTypes = [ "application/xhtml+xml" ];
+
+ this.supportsAsyncChange = false;
+ this.async = false;
+ this.fixedAttributeNames = [
+ "validating", "expandEntityReferences", "coalescing",
+ "signed", "hasNullString", "ignoringElementContentWhitespace", "namespaceAware", "ignoringComments", "schemaValidating"];
+
+ this.fixedAttributeValues = [false, true, false, true, true , false, true, false, false ];
+ this.configurableAttributeNames = [ ];
+ this.configurableAttributeValues = [ ];
+ this.initializationError = null;
+ this.initializationFatalError = null;
+ this.skipIncompatibleTests = true;
+ this.documentURLs = new Array();
+ this.documentVarnames = new Array();
+}
+
+HTMLBuilder.prototype.hasFeature = function(feature, version) {
+ return document.implementation.hasFeature(feature, version);
+}
+
+HTMLBuilder.prototype.getImplementation = function() {
+ return document.implementation;
+}
+
+HTMLBuilder.prototype.preload = function(frame, varname, url) {
+ var i;
+ this.documentVarnames[this.documentVarnames.length] = varname;
+ this.documentURLs[this.documentURLs.length] = url;
+ if (this.documentURLs.length > 1) {
+ //
+ // if all the urls are not the same
+ //
+ for (i = 1; i < this.documentURLs.length; i++) {
+ if (this.documentURLs[i] != this.documentURLs[0]) {
+ throw "Tests with multiple loads of different documents are not currently supported";
+ }
+ }
+ }
+ return 1;
+}
+
+HTMLBuilder.prototype.cloneNode = function(srcNode, doc) {
+ var clone = null;
+ switch(srcNode.nodeType) {
+ //
+ // element
+ case 1:
+ clone = doc.createElementNS(srcNode.namespaceURI, srcNode.nodeName);
+ var attrs = srcNode.attributes;
+ for(var i = 0; i < attrs.length; i++) {
+ var srcAttr = attrs.item(i);
+ clone.setAttributeNS(srcAttr.namespaceURI, srcAttr.nodeName, srcAttr.nodeValue);
+ }
+ var srcChild = srcNode.firstChild;
+ while(srcChild != null) {
+ var cloneChild = this.cloneNode(srcChild, doc);
+ if (cloneChild != null) {
+ clone.appendChild(cloneChild);
+ }
+ srcChild = srcChild.nextSibling;
+ }
+ break;
+
+ case 3:
+ clone = doc.createTextNode(srcNode.nodeValue);
+ break;
+
+ case 4:
+ clone = doc.createCDATASection(srcNode.nodeValue);
+ break;
+
+ case 5:
+ clone = doc.createEntityReference(srcNode.nodeName);
+ break;
+
+ case 7:
+ clone = doc.createProcessingInstruction(srcNode.target, srcNode.data);
+ break;
+
+ case 8:
+ clone = doc.createComment(srcNode.nodeValue);
+ break;
+ }
+ return clone;
+
+}
+
+
+HTMLBuilder.prototype.load = function(frame, varname, url) {
+ if (this.documentVarnames[0] == varname) {
+ return document;
+ }
+ //
+ //
+ // not a perfect way to do this
+ // Document.cloneNode is implementation dependent but exists in L1
+ // and implemented in IE. The alternative brute force copy
+ // only works in L2 or higher implementations and can't copy
+ // entity and notation definitions, etc.
+ var clone = null;
+ try {
+ clone = document.cloneNode(true);
+ } catch(ex) {
+ }
+ if (clone == null) {
+ clone = document.implementation.createDocument(
+ document.documentElement.namespaceURI,
+ document.documentElement.nodeName,
+ null);
+ //
+ // Work-around since
+ // Safari does not create document element
+ // create document.
+ if (clone.documentElement == null) {
+ clone.appendChild(clone.createElementNS(
+ document.documentElement.namespaceURI,
+ document.documentElement.nodeName));
+ }
+ var attrs = document.documentElement.attributes;
+ for(var i = 0; i < attrs.length; i++) {
+ var srcAttr = attrs.item(i);
+ clone.documentElement.setAttributeNS(
+ srcAttr.namespaceURI, srcAttr.nodeName, srcAttr.nodeValue);
+ }
+
+ var srcNode = document.firstChild;
+ while(srcNode != null && srcNode.nodeType != 1) {
+ if (srcNode.nodeType != 10) {
+ var cloneNode = this.cloneNode(srcNode, clone);
+ clone.insertBefore(cloneNode, clone.documentElement);
+ }
+ srcNode = srcNode.nextSibling;
+ }
+ srcNode = document.documentElement.nextSibling;
+ while(srcNode != null) {
+ var cloneNode = this.cloneNode(srcNode, clone);
+ clone.appendChild(cloneNode);
+ srcNode = srcNode.nextSibling;
+ }
+ srcNode = document.documentElement.firstChild;
+ while(srcNode != null) {
+ var cloneNode = this.cloneNode(srcNode, clone);
+ if (cloneNode != null) {
+ clone.documentElement.appendChild(cloneNode);
+ }
+ srcNode = srcNode.nextSibling;
+ }
+ }
+ return clone;
+}
+
+HTMLBuilder.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;
+}
+
+
+HTMLBuilder.prototype.setImplementationAttribute = function(attribute, value) {
+ var supported = this.getImplementationAttribute(attribute);
+ if (supported != value) {
+ this.initializationError = "HTML loader does not support " + attribute + "=" + value;
+ }
+}
+
+HTMLBuilder.prototype.canSetImplementationAttribute = function(attribute, value) {
+ var supported = this.getImplementationAttribute(attribute);
+ return (supported == value);
+}
+
+
+
+
+function createConfiguredBuilder() {
+ return new HTMLBuilder();
+}
+
+function catchInitializationError(buildr, ex) {
+ buildr.initializationError = ex;
+ buildr.initializationFatalError = ex;
+}
+
+
+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 setResult(resultType, message) {
+ var testName = getTargetURI();
+ document.title = testName + ":" + resultType;
+ var xhtmlNS = "http://www.w3.org/1999/xhtml";
+ var newBody = document.createElementNS(xhtmlNS, "body");
+ var newTable = document.createElementNS(xhtmlNS, "table");
+ newTable.width = "100%";
+ newTable.border = "1";
+ newBody.appendChild(newTable);
+ var testRow = newTable.insertRow(-1);
+ var testDiv1 = testRow.insertCell(-1);
+ testDiv1.appendChild(document.createTextNode("Test"));
+ var testDiv2 = testRow.insertCell(-1);
+ testDiv2.appendChild(document.createTextNode(testName));
+ var statusRow = newTable.insertRow(-1);
+ var statusDiv1 = statusRow.insertCell(-1);
+ statusDiv1.appendChild(document.createTextNode("Status"));
+ var statusDiv2 = statusRow.insertCell(-1);
+ var style = "color:green";
+ if (resultType == null) {
+ statusDiv2.appendChild(document.createTextNode("Success"));
+ } else {
+ statusDiv2.appendChild(document.createTextNode(resultType));
+ if (resultType == "skip") {
+ style = "color:blue";
+ } else {
+ style = "color:red";
+ }
+ }
+ newTable.setAttributeNS(null, "style", style);
+ if (message != null) {
+ var messageRow = newTable.insertRow(-1);
+ var messageDiv1 = messageRow.insertCell(-1);
+ messageDiv1.appendChild(document.createTextNode("Message"));
+ var messageDiv2 = messageRow.insertCell(-1);
+ messageDiv2.appendChild(document.createTextNode(message));
+ }
+ var oldBody = document.getElementsByTagName("body")[0];
+ oldBody.parentNode.replaceChild(newBody, oldBody);
+ if (parent != window && typeof(parent.setResult) != 'undefined') {
+ parent.setResult(testName, resultType, message);
+ }
+}
+
+function checkInitialization(buildr, testname) {
+ return buildr.initializationError;
+}
+
+function preload(docRef, varname, href) {
+ return builder.preload(docRef, varname, href);
+}
+
+
+function load(docRef, varname, href) {
+ return builder.load(docRef, varname, href);
+}
+
+
+function getImplementationAttribute(attr) {
+ return builder.getImplementationAttribute(attr);
+}
+
+
+function setImplementationAttribute(attribute, value) {
+ builder.setImplementationAttribute(attribute, value);
+}
+
+function createXPathEvaluator(doc) {
+ try {
+ return doc.getFeature("XPath", null);
+ }
+ catch(ex) {
+ }
+ return doc;
+}
+
+
+function getImplementation() {
+ return builder.getImplementation();
+}
+
+function assertEquals(id, expected, actual) {
+ var myActual;
+ if (expected != actual) {
+ myActual = actual;
+ if (actual == null) {
+ myActual = "null";
+ }
+ throw "failure:" + id + ": assertEquals failed, actual " + myActual + ", expected " + expected + ".";
+ }
+}
+
+function assertNull(id, actual) {
+ if (actual != null) {
+ throw "failure:" + id + ": assertNull failed, actual " + actual;
+ }
+}
+
+
+function assertTrue(id, actual) {
+ if (!actual) {
+ throw "failure:" + id + ": assertTrue failed";
+ }
+}
+
+
+function assertFalse(id, actual) {
+ if (actual) {
+ throw "failure:" + id + ": assertTrue failed";
+ }
+}
+
+function assertNotNull(id, actual) {
+ if (actual == null) {
+ throw "failure:" + id + ": assertNotNull failed";
+ }
+}
+
+function fail(id) {
+ throw "failure:" + id + ": fail";
+}
+
+
+
+function getSuffix(contentType) {
+ switch(contentType) {
+ case "text/html":
+ return ".html";
+
+ case "text/xml":
+ return ".xml";
+
+ case "image/svg+xml":
+ return ".svg";
+
+ case "text/mathml":
+ return ".mml";
+ }
+ return ".xhtml";
+}
+
+
+function getResourceURI(name, scheme, contentType) {
+ var base = document.documentURI;
+ if (base == null) {
+ base = "";
+ } else {
+ base = base.substring(0, base.lastIndexOf('/') + 1) + "files/";
+ }
+ return base + name + getSuffix(contentType);
+}
+
+
+
+function startTest() {
+
+//
+// WebKit modification: 18-August-2005
+//
+// Inform the test controller that this test has a text-format result and so should
+// be dumped as text, and also that the dump should not occur automatically.
+//
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+//
+// End WebKit modification
+//
+
+ //
+ // invoke test setup
+ //
+ setUpPage();
+ try {
+ runTest();
+ if (builder.initializationError == null) {
+ setResult(null, null);
+ } else {
+ setResult("skip", builder.initializationError);
+ }
+ } catch(ex) {
+ if (typeof(ex.substring) != 'undefined' && ex.substring(0, 8) == "failure:") {
+ setResult("failure", ex.substring(8));
+ } else {
+ setResult("error", ex);
+ }
+ }
+
+//
+// WebKit modification: 18-August-2005
+//
+// Inform the test controller that this test is complete, so it's time to dump.
+//
+ if (window.layoutTestController) {
+ layoutTestController.notifyDone();
+ }
+//
+// End WebKit modification
+//
+
+}
diff --git a/LayoutTests/dom/xhtml/level1/core/staff.dtd b/LayoutTests/dom/xhtml/level1/core/staff.dtd
new file mode 100644
index 0000000..02a994d
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/staff.dtd
@@ -0,0 +1,17 @@
+<!ELEMENT employeeId (#PCDATA)>
+<!ELEMENT name (#PCDATA)>
+<!ELEMENT position (#PCDATA)>
+<!ELEMENT salary (#PCDATA)>
+<!ELEMENT address (#PCDATA)>
+<!ELEMENT entElement ( #PCDATA ) >
+<!ELEMENT gender ( #PCDATA | entElement )* >
+<!ELEMENT employee (employeeId, name, position, salary, gender, address) >
+<!ELEMENT staff (employee)+>
+<!ATTLIST entElement
+ attr1 CDATA "Attr">
+<!ATTLIST address
+ domestic CDATA #IMPLIED
+ street CDATA "Yes">
+<!ATTLIST entElement
+ domestic CDATA "MALE" >
+
diff --git a/LayoutTests/dom/xhtml/level1/core/xhtml-lat1.ent b/LayoutTests/dom/xhtml/level1/core/xhtml-lat1.ent
new file mode 100644
index 0000000..ffee223
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/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/LayoutTests/dom/xhtml/level1/core/xhtml-special.ent b/LayoutTests/dom/xhtml/level1/core/xhtml-special.ent
new file mode 100644
index 0000000..ca358b2
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/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/LayoutTests/dom/xhtml/level1/core/xhtml-symbol.ent b/LayoutTests/dom/xhtml/level1/core/xhtml-symbol.ent
new file mode 100644
index 0000000..63c2abf
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/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/LayoutTests/dom/xhtml/level1/core/xhtml1-frameset.dtd b/LayoutTests/dom/xhtml/level1/core/xhtml1-frameset.dtd
new file mode 100644
index 0000000..35773b0
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/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: 10625 $
+ $Date: 2005-09-26 15:35:36 -0700 (Mon, 26 Sep 2005) $
+
+-->
+
+<!--================ 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/LayoutTests/dom/xhtml/level1/core/xhtml1-strict.dtd b/LayoutTests/dom/xhtml/level1/core/xhtml1-strict.dtd
new file mode 100644
index 0000000..7174a4e
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/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: 10625 $
+ $Date: 2005-09-26 15:35:36 -0700 (Mon, 26 Sep 2005) $
+
+-->
+
+<!--================ 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/LayoutTests/dom/xhtml/level1/core/xhtml1-transitional.dtd b/LayoutTests/dom/xhtml/level1/core/xhtml1-transitional.dtd
new file mode 100644
index 0000000..8d62e50
--- /dev/null
+++ b/LayoutTests/dom/xhtml/level1/core/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: 10625 $
+ $Date: 2005-09-26 15:35:36 -0700 (Mon, 26 Sep 2005) $
+
+-->
+
+<!--================ 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
+ >
+