html.js 547 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646
  1. var fs = require('fs');
  2. var jsdom = require("../../lib/jsdom");
  3. var fileCache = {};
  4. var load = function(name) {
  5. var file = __dirname + "/html/files/" + name + ".html",
  6. contents = fileCache[file] || fs.readFileSync(file, 'utf8'),
  7. doc = jsdom.jsdom(contents, null, {url: "file://" + file });
  8. fileCache[file] = contents;
  9. return doc;
  10. }
  11. var level2 = require("../../lib/jsdom/level2/html").dom.level2.html;
  12. var getImplementation = function() {
  13. var doc = new level2.HTMLDocument();
  14. return doc.implementation;
  15. };
  16. exports.tests = {
  17. /**
  18. *
  19. The accessKey attribute is a single character access key to give
  20. access to the form control.
  21. Retrieve the accessKey attribute and examine its value.
  22. * @author NIST
  23. * @author Mary Brady
  24. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89647724
  25. */
  26. HTMLAnchorElement01: function(test) {
  27. var success;
  28. var nodeList;
  29. var testNode;
  30. var vaccesskey;
  31. var doc;
  32. var docRef = null;
  33. if (typeof(this.doc) != 'undefined') {
  34. docRef = this.doc;
  35. }
  36. doc = load("anchor");
  37. nodeList = doc.getElementsByTagName("a");
  38. test.equal(nodeList.length, 1, 'Asize');
  39. testNode = nodeList.item(0);
  40. vaccesskey = testNode.accessKey;
  41. test.equal(vaccesskey, "g", "accessKeyLink");
  42. test.done();
  43. },
  44. /**
  45. *
  46. The charset attribute indicates the character encoding of the linked
  47. resource.
  48. Retrieve the charset attribute and examine its value.
  49. * @author NIST
  50. * @author Mary Brady
  51. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67619266
  52. */
  53. HTMLAnchorElement02: function(test) {
  54. var success;
  55. var nodeList;
  56. var testNode;
  57. var vcharset;
  58. var doc;
  59. var docRef = null;
  60. if (typeof(this.doc) != 'undefined') {
  61. docRef = this.doc;
  62. }
  63. doc = load("anchor");
  64. nodeList = doc.getElementsByTagName("a");
  65. test.equal(nodeList.length, 1, 'Asize');
  66. testNode = nodeList.item(0);
  67. vcharset = testNode.charset;
  68. test.equal(vcharset, "US-ASCII", "charsetLink");
  69. test.done();
  70. },
  71. /**
  72. *
  73. The coords attribute is a comma-seperated list of lengths, defining
  74. an active region geometry.
  75. Retrieve the coords attribute and examine its value.
  76. * @author NIST
  77. * @author Mary Brady
  78. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92079539
  79. */
  80. HTMLAnchorElement03: function(test) {
  81. var success;
  82. var nodeList;
  83. var testNode;
  84. var vcoords;
  85. var doc;
  86. var docRef = null;
  87. if (typeof(this.doc) != 'undefined') {
  88. docRef = this.doc;
  89. }
  90. doc = load("anchor");
  91. nodeList = doc.getElementsByTagName("a");
  92. test.equal(nodeList.length, 1, 'Asize');
  93. testNode = nodeList.item(0);
  94. vcoords = testNode.coords;
  95. test.equal(vcoords, "0,0,100,100", "coordsLink");
  96. test.done();
  97. },
  98. /**
  99. *
  100. The href attribute contains the URL of the linked resource.
  101. Retrieve the href attribute and examine its value.
  102. * @author NIST
  103. * @author Mary Brady
  104. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88517319
  105. */
  106. HTMLAnchorElement04: function(test) {
  107. var doc = load("anchor");
  108. var nodeList = doc.getElementsByTagName("a");
  109. test.equal(nodeList.length, 1, 'Asize');
  110. test.equal(nodeList.item(0).href, 'file://'+__dirname+'/html/files/pix/submit.gif', 'hrefLink');
  111. test.done();
  112. },
  113. /**
  114. *
  115. The hreflang attribute contains the language code of the linked resource.
  116. Retrieve the hreflang attribute and examine its value.
  117. * @author NIST
  118. * @author Mary Brady
  119. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87358513
  120. */
  121. HTMLAnchorElement05: function(test) {
  122. var success;
  123. var nodeList;
  124. var testNode;
  125. var vhreflink;
  126. var doc;
  127. var docRef = null;
  128. if (typeof(this.doc) != 'undefined') {
  129. docRef = this.doc;
  130. }
  131. doc = load("anchor");
  132. nodeList = doc.getElementsByTagName("a");
  133. test.equal(nodeList.length, 1, 'Asize');
  134. testNode = nodeList.item(0);
  135. vhreflink = testNode.hreflang;
  136. test.equal(vhreflink, "en", "hreflangLink");
  137. test.done();
  138. },
  139. /**
  140. *
  141. The name attribute contains the anchor name.
  142. Retrieve the name attribute and examine its value.
  143. * @author NIST
  144. * @author Mary Brady
  145. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32783304
  146. */
  147. HTMLAnchorElement06: function(test) {
  148. var success;
  149. var nodeList;
  150. var testNode;
  151. var vname;
  152. var doc;
  153. var docRef = null;
  154. if (typeof(this.doc) != 'undefined') {
  155. docRef = this.doc;
  156. }
  157. doc = load("anchor");
  158. nodeList = doc.getElementsByTagName("a");
  159. test.equal(nodeList.length, 1, 'Asize');
  160. testNode = nodeList.item(0);
  161. vname = testNode.name;
  162. test.equal(vname, "Anchor", "nameLink");
  163. test.done();
  164. },
  165. /**
  166. *
  167. The rel attribute contains the forward link type.
  168. Retrieve the rel attribute and examine its value.
  169. * @author NIST
  170. * @author Mary Brady
  171. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-3815891
  172. */
  173. HTMLAnchorElement07: function(test) {
  174. var success;
  175. var nodeList;
  176. var testNode;
  177. var vrel;
  178. var doc;
  179. var docRef = null;
  180. if (typeof(this.doc) != 'undefined') {
  181. docRef = this.doc;
  182. }
  183. doc = load("anchor");
  184. nodeList = doc.getElementsByTagName("a");
  185. test.equal(nodeList.length, 1, 'Asize');
  186. testNode = nodeList.item(0);
  187. vrel = testNode.rel;
  188. test.equal(vrel, "GLOSSARY", "relLink");
  189. test.done();
  190. },
  191. /**
  192. *
  193. The rev attribute contains the reverse link type
  194. Retrieve the rev attribute and examine its value.
  195. * @author NIST
  196. * @author Mary Brady
  197. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58259771
  198. */
  199. HTMLAnchorElement08: function(test) {
  200. var success;
  201. var nodeList;
  202. var testNode;
  203. var vrev;
  204. var doc;
  205. var docRef = null;
  206. if (typeof(this.doc) != 'undefined') {
  207. docRef = this.doc;
  208. }
  209. doc = load("anchor");
  210. nodeList = doc.getElementsByTagName("a");
  211. test.equal(nodeList.length, 1, 'Asize');
  212. testNode = nodeList.item(0);
  213. vrev = testNode.rev;
  214. test.equal(vrev, "STYLESHEET", "revLink");
  215. test.done();
  216. },
  217. /**
  218. *
  219. The shape attribute contains the shape of the active area.
  220. Retrieve the shape attribute and examine its value.
  221. * @author NIST
  222. * @author Mary Brady
  223. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49899808
  224. */
  225. HTMLAnchorElement09: function(test) {
  226. var success;
  227. var nodeList;
  228. var testNode;
  229. var vshape;
  230. var doc;
  231. var docRef = null;
  232. if (typeof(this.doc) != 'undefined') {
  233. docRef = this.doc;
  234. }
  235. doc = load("anchor");
  236. nodeList = doc.getElementsByTagName("a");
  237. test.equal(nodeList.length, 1, 'Asize');
  238. testNode = nodeList.item(0);
  239. vshape = testNode.shape;
  240. test.equal(vshape, "rect", "shapeLink");
  241. test.done();
  242. },
  243. /**
  244. *
  245. The tabIndex attribute contains an index that represents the elements
  246. position in the tabbing order.
  247. Retrieve the tabIndex attribute and examine its value.
  248. * @author NIST
  249. * @author Mary Brady
  250. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41586466
  251. */
  252. HTMLAnchorElement10: function(test) {
  253. var success;
  254. var nodeList;
  255. var testNode;
  256. var vtabindex;
  257. var doc;
  258. var docRef = null;
  259. if (typeof(this.doc) != 'undefined') {
  260. docRef = this.doc;
  261. }
  262. doc = load("anchor");
  263. nodeList = doc.getElementsByTagName("a");
  264. test.equal(nodeList.length, 1, 'Asize');
  265. testNode = nodeList.item(0);
  266. vtabindex = testNode.tabIndex;
  267. test.equal(vtabindex, 22, "tabIndexLink");
  268. test.done();
  269. },
  270. /**
  271. *
  272. The target attribute specifies the frame to render the source in.
  273. Retrieve the target attribute and examine it's value.
  274. * @author NIST
  275. * @author Rick Rivello
  276. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6414197
  277. */
  278. HTMLAnchorElement11: function(test) {
  279. var success;
  280. var nodeList;
  281. var testNode;
  282. var vtarget;
  283. var doc;
  284. var docRef = null;
  285. if (typeof(this.doc) != 'undefined') {
  286. docRef = this.doc;
  287. }
  288. doc = load("anchor2");
  289. nodeList = doc.getElementsByTagName("a");
  290. test.equal(nodeList.length, 1, 'Asize');
  291. testNode = nodeList.item(0);
  292. vtarget = testNode.target;
  293. test.equal(vtarget, "dynamic", "targetLink");
  294. test.done();
  295. },
  296. /**
  297. *
  298. The type attribute contains the advisory content model.
  299. Retrieve the type attribute and examine its value.
  300. * @author NIST
  301. * @author Mary Brady
  302. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63938221
  303. */
  304. HTMLAnchorElement12: function(test) {
  305. var success;
  306. var nodeList;
  307. var testNode;
  308. var vtype;
  309. var doc;
  310. var docRef = null;
  311. if (typeof(this.doc) != 'undefined') {
  312. docRef = this.doc;
  313. }
  314. doc = load("anchor");
  315. nodeList = doc.getElementsByTagName("a");
  316. test.equal(nodeList.length, 1, 'Asize');
  317. testNode = nodeList.item(0);
  318. vtype = testNode.type;
  319. test.equal(vtype, "image/gif", "typeLink");
  320. test.done();
  321. },
  322. /**
  323. *
  324. HTMLAnchorElement.blur should surrender input focus.
  325. * @author Curt Arnold
  326. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65068939
  327. */
  328. HTMLAnchorElement13: function(test) {
  329. var success;
  330. var nodeList;
  331. var testNode;
  332. var doc;
  333. var docRef = null;
  334. if (typeof(this.doc) != 'undefined') {
  335. docRef = this.doc;
  336. }
  337. doc = load("anchor");
  338. nodeList = doc.getElementsByTagName("a");
  339. test.equal(nodeList.length, 1, 'Asize');
  340. testNode = nodeList.item(0);
  341. testNode.blur();
  342. test.done();
  343. },
  344. /**
  345. *
  346. HTMLAnchorElement.focus should capture input focus.
  347. * @author Curt Arnold
  348. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47150313
  349. */
  350. HTMLAnchorElement14: function(test) {
  351. var success;
  352. var nodeList;
  353. var testNode;
  354. var doc;
  355. var docRef = null;
  356. if (typeof(this.doc) != 'undefined') {
  357. docRef = this.doc;
  358. }
  359. doc = load("anchor");
  360. nodeList = doc.getElementsByTagName("a");
  361. test.equal(nodeList.length, 1, 'Asize');
  362. testNode = nodeList.item(0);
  363. testNode.focus();
  364. test.done();
  365. },
  366. /**
  367. *
  368. The align attribute specifies the alignment of the object(Vertically
  369. or Horizontally) with respect to its surrounding text.
  370. Retrieve the align attribute and examine its value.
  371. * @author NIST
  372. * @author Mary Brady
  373. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8049912
  374. */
  375. HTMLAppletElement01: function(test) {
  376. var success;
  377. var nodeList;
  378. var testNode;
  379. var valign;
  380. var doc;
  381. var docRef = null;
  382. if (typeof(this.doc) != 'undefined') {
  383. docRef = this.doc;
  384. }
  385. doc = load("applet");
  386. nodeList = doc.getElementsByTagName("applet");
  387. test.equal(nodeList.length, 1, 'Asize');
  388. testNode = nodeList.item(0);
  389. valign = testNode.align;
  390. test.equal(valign.toLowerCase(), "bottom".toLowerCase(), "alignLink");
  391. test.done();
  392. },
  393. /**
  394. *
  395. The alt attribute specifies the alternate text for user agents not
  396. rendering the normal context of this element.
  397. Retrieve the alt attribute and examine its value.
  398. * @author NIST
  399. * @author Mary Brady
  400. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58610064
  401. */
  402. HTMLAppletElement02: function(test) {
  403. var success;
  404. var nodeList;
  405. var testNode;
  406. var valt;
  407. var doc;
  408. var docRef = null;
  409. if (typeof(this.doc) != 'undefined') {
  410. docRef = this.doc;
  411. }
  412. doc = load("applet");
  413. nodeList = doc.getElementsByTagName("applet");
  414. test.equal(nodeList.length, 1, 'Asize');
  415. testNode = nodeList.item(0);
  416. valt = testNode.alt;
  417. test.equal(valt, "Applet Number 1", "altLink");
  418. test.done();
  419. },
  420. /**
  421. *
  422. The archive attribute specifies a comma-seperated archive list.
  423. Retrieve the archive attribute and examine its value.
  424. * @author NIST
  425. * @author Mary Brady
  426. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14476360
  427. */
  428. HTMLAppletElement03: function(test) {
  429. var success;
  430. var nodeList;
  431. var testNode;
  432. var varchive;
  433. var doc;
  434. var docRef = null;
  435. if (typeof(this.doc) != 'undefined') {
  436. docRef = this.doc;
  437. }
  438. doc = load("applet");
  439. nodeList = doc.getElementsByTagName("applet");
  440. test.equal(nodeList.length, 1, 'Asize');
  441. testNode = nodeList.item(0);
  442. varchive = testNode.archive;
  443. test.equal(varchive, "", "archiveLink");
  444. test.done();
  445. },
  446. /**
  447. *
  448. The code attribute specifies the applet class file.
  449. Retrieve the code attribute and examine its value.
  450. * @author NIST
  451. * @author Mary Brady
  452. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61509645
  453. */
  454. HTMLAppletElement04: function(test) {
  455. var success;
  456. var nodeList;
  457. var testNode;
  458. var vcode;
  459. var doc;
  460. var docRef = null;
  461. if (typeof(this.doc) != 'undefined') {
  462. docRef = this.doc;
  463. }
  464. doc = load("applet");
  465. nodeList = doc.getElementsByTagName("applet");
  466. test.equal(nodeList.length, 1, 'Asize');
  467. testNode = nodeList.item(0);
  468. vcode = testNode.code;
  469. test.equal(vcode, "org/w3c/domts/DOMTSApplet.class", "codeLink");
  470. test.done();
  471. },
  472. /**
  473. *
  474. The codeBase attribute specifies an optional base URI for the applet.
  475. Retrieve the codeBase attribute and examine its value.
  476. * @author NIST
  477. * @author Mary Brady
  478. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6581160
  479. */
  480. HTMLAppletElement05: function(test) {
  481. var success;
  482. var nodeList;
  483. var testNode;
  484. var vcodebase;
  485. var doc;
  486. var docRef = null;
  487. if (typeof(this.doc) != 'undefined') {
  488. docRef = this.doc;
  489. }
  490. doc = load("applet");
  491. nodeList = doc.getElementsByTagName("applet");
  492. test.equal(nodeList.length, 1, 'Asize');
  493. testNode = nodeList.item(0);
  494. vcodebase = testNode.codeBase;
  495. test.equal(vcodebase, "applets", "codebase");
  496. test.done();
  497. },
  498. /**
  499. *
  500. The height attribute overrides the height.
  501. Retrieve the height attribute and examine its value.
  502. * @author NIST
  503. * @author Mary Brady
  504. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90184867
  505. */
  506. HTMLAppletElement06: function(test) {
  507. var success;
  508. var nodeList;
  509. var testNode;
  510. var vheight;
  511. var doc;
  512. var docRef = null;
  513. if (typeof(this.doc) != 'undefined') {
  514. docRef = this.doc;
  515. }
  516. doc = load("applet");
  517. nodeList = doc.getElementsByTagName("applet");
  518. test.equal(nodeList.length, 1, 'Asize');
  519. testNode = nodeList.item(0);
  520. vheight = testNode.height;
  521. test.equal(vheight, "306", "heightLink");
  522. test.done();
  523. },
  524. /**
  525. *
  526. The hspace attribute specifies the horizontal space to the left
  527. and right of this image, applet, or object.
  528. Retrieve the hspace attribute and examine it's value.
  529. * @author NIST
  530. * @author Mary Brady
  531. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-1567197
  532. */
  533. HTMLAppletElement07: function(test) {
  534. var success;
  535. var nodeList;
  536. var testNode;
  537. var vhspace;
  538. var doc;
  539. var docRef = null;
  540. if (typeof(this.doc) != 'undefined') {
  541. docRef = this.doc;
  542. }
  543. doc = load("applet");
  544. nodeList = doc.getElementsByTagName("applet");
  545. test.equal(nodeList.length, 1, 'Asize');
  546. testNode = nodeList.item(0);
  547. vhspace = testNode.hspace;
  548. test.equal(vhspace, 0, "hspaceLink");
  549. test.done();
  550. },
  551. /**
  552. *
  553. The name attribute specifies the name of the applet.
  554. Retrieve the name attribute and examine its value.
  555. * @author NIST
  556. * @author Mary Brady
  557. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39843695
  558. */
  559. HTMLAppletElement08: function(test) {
  560. var success;
  561. var nodeList;
  562. var testNode;
  563. var vname;
  564. var doc;
  565. var docRef = null;
  566. if (typeof(this.doc) != 'undefined') {
  567. docRef = this.doc;
  568. }
  569. doc = load("applet");
  570. nodeList = doc.getElementsByTagName("applet");
  571. test.equal(nodeList.length, 1, 'Asize');
  572. testNode = nodeList.item(0);
  573. vname = testNode.name;
  574. test.equal(vname, "applet1", "nameLink");
  575. test.done();
  576. },
  577. /**
  578. *
  579. The vspace attribute specifies the vertical space above and below
  580. this image, applet or object.
  581. Retrieve the vspace attribute and examine it's value.
  582. * @author NIST
  583. * @author Mary Brady
  584. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-22637173
  585. */
  586. HTMLAppletElement09: function(test) {
  587. var success;
  588. var nodeList;
  589. var testNode;
  590. var vvspace;
  591. var doc;
  592. var docRef = null;
  593. if (typeof(this.doc) != 'undefined') {
  594. docRef = this.doc;
  595. }
  596. doc = load("applet");
  597. nodeList = doc.getElementsByTagName("applet");
  598. test.equal(nodeList.length, 1, 'Asize');
  599. testNode = nodeList.item(0);
  600. vvspace = testNode.vspace;
  601. test.equal(vvspace, 0, "vspaceLink");
  602. test.done();
  603. },
  604. /**
  605. *
  606. The width attribute overrides the regular width.
  607. Retrieve the width attribute and examine its value.
  608. * @author NIST
  609. * @author Mary Brady
  610. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16526327
  611. */
  612. HTMLAppletElement10: function(test) {
  613. var success;
  614. var nodeList;
  615. var testNode;
  616. var vwidth;
  617. var doc;
  618. var docRef = null;
  619. if (typeof(this.doc) != 'undefined') {
  620. docRef = this.doc;
  621. }
  622. doc = load("applet");
  623. nodeList = doc.getElementsByTagName("applet");
  624. test.equal(nodeList.length, 1, 'Asize');
  625. testNode = nodeList.item(0);
  626. vwidth = testNode.width;
  627. test.equal(vwidth, "301", "widthLink");
  628. test.done();
  629. },
  630. /**
  631. *
  632. The object attribute specifies the serialized applet file.
  633. Retrieve the object attribute and examine its value.
  634. * @author NIST
  635. * @author Rick Rivello
  636. * @author Curt Arnold
  637. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93681523
  638. */
  639. HTMLAppletElement11: function(test) {
  640. var success;
  641. var nodeList;
  642. var testNode;
  643. var vobject;
  644. var doc;
  645. var docRef = null;
  646. if (typeof(this.doc) != 'undefined') {
  647. docRef = this.doc;
  648. }
  649. doc = load("applet2");
  650. nodeList = doc.getElementsByTagName("applet");
  651. test.equal(nodeList.length, 1, 'Asize');
  652. testNode = nodeList.item(0);
  653. vobject = testNode.object;
  654. test.equal(vobject, "DOMTSApplet.dat", "object");
  655. test.done();
  656. },
  657. /**
  658. *
  659. The accessKey attribute specifies a single character access key to
  660. give access to the control form.
  661. Retrieve the accessKey attribute and examine its value.
  662. * @author NIST
  663. * @author Mary Brady
  664. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57944457
  665. */
  666. HTMLAreaElement01: function(test) {
  667. var success;
  668. var nodeList;
  669. var testNode;
  670. var vaccesskey;
  671. var doc;
  672. var docRef = null;
  673. if (typeof(this.doc) != 'undefined') {
  674. docRef = this.doc;
  675. }
  676. doc = load("area");
  677. nodeList = doc.getElementsByTagName("area");
  678. test.equal(nodeList.length, 1, 'Asize');
  679. testNode = nodeList.item(0);
  680. vaccesskey = testNode.accessKey;
  681. test.equal(vaccesskey, "a", "alignLink");
  682. test.done();
  683. },
  684. /**
  685. *
  686. The alt attribute specifies an alternate text for user agents not
  687. rendering the normal content of this element.
  688. Retrieve the alt attribute and examine its value.
  689. * @author NIST
  690. * @author Mary Brady
  691. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39775416
  692. */
  693. HTMLAreaElement02: function(test) {
  694. var success;
  695. var nodeList;
  696. var testNode;
  697. var valt;
  698. var doc;
  699. var docRef = null;
  700. if (typeof(this.doc) != 'undefined') {
  701. docRef = this.doc;
  702. }
  703. doc = load("area");
  704. nodeList = doc.getElementsByTagName("area");
  705. test.equal(nodeList.length, 1, 'Asize');
  706. testNode = nodeList.item(0);
  707. valt = testNode.alt;
  708. test.equal(valt, "Domain", "altLink");
  709. test.done();
  710. },
  711. /**
  712. *
  713. The coords attribute specifies a comma-seperated list of lengths,
  714. defining an active region geometry.
  715. Retrieve the coords attribute and examine its value.
  716. * @author NIST
  717. * @author Mary Brady
  718. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66021476
  719. */
  720. HTMLAreaElement03: function(test) {
  721. var success;
  722. var nodeList;
  723. var testNode;
  724. var vcoords;
  725. var doc;
  726. var docRef = null;
  727. if (typeof(this.doc) != 'undefined') {
  728. docRef = this.doc;
  729. }
  730. doc = load("area");
  731. nodeList = doc.getElementsByTagName("area");
  732. test.equal(nodeList.length, 1, 'Asize');
  733. testNode = nodeList.item(0);
  734. vcoords = testNode.coords;
  735. test.equal(vcoords, "0,2,45,45", "coordsLink");
  736. test.done();
  737. },
  738. /**
  739. *
  740. The href attribute specifies the URI of the linked resource.
  741. Retrieve the href attribute and examine its value.
  742. * @author NIST
  743. * @author Mary Brady
  744. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-34672936
  745. */
  746. HTMLAreaElement04: function(test) {
  747. var doc = load("area");
  748. var nodeList = doc.getElementsByTagName("area");
  749. test.equal(nodeList.length, 1, 'Asize');
  750. test.equal(nodeList.item(0).href, './files/dletter.html', 'hrefLink');
  751. test.done();
  752. },
  753. /**
  754. *
  755. The noHref attribute specifies that this area is inactive.
  756. Retrieve the noHref attribute and examine its value.
  757. * @author NIST
  758. * @author Mary Brady
  759. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61826871
  760. */
  761. HTMLAreaElement05: function(test) {
  762. var success;
  763. var nodeList;
  764. var testNode;
  765. var vnohref;
  766. var doc;
  767. var docRef = null;
  768. if (typeof(this.doc) != 'undefined') {
  769. docRef = this.doc;
  770. }
  771. doc = load("area");
  772. nodeList = doc.getElementsByTagName("area");
  773. test.equal(nodeList.length, 1, 'Asize');
  774. testNode = nodeList.item(0);
  775. vnohref = testNode.noHref;
  776. test.equal(vnohref, false, 'vnohref should be *false*');
  777. test.done();
  778. },
  779. /**
  780. *
  781. The shape attribute specifies the shape of the active area.
  782. Retrieve the shape attribute and examine its value.
  783. * @author NIST
  784. * @author Mary Brady
  785. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85683271
  786. */
  787. HTMLAreaElement06: function(test) {
  788. var success;
  789. var nodeList;
  790. var testNode;
  791. var vshape;
  792. var doc;
  793. var docRef = null;
  794. if (typeof(this.doc) != 'undefined') {
  795. docRef = this.doc;
  796. }
  797. doc = load("area");
  798. nodeList = doc.getElementsByTagName("area");
  799. test.equal(nodeList.length, 1, 'Asize');
  800. testNode = nodeList.item(0);
  801. vshape = testNode.shape;
  802. test.equal(vshape.toLowerCase(), "rect".toLowerCase(), "shapeLink");
  803. test.done();
  804. },
  805. /**
  806. *
  807. The tabIndex attribute specifies an index that represents the element's
  808. position in the tabbing order.
  809. Retrieve the tabIndex attribute and examine its value.
  810. * @author NIST
  811. * @author Mary Brady
  812. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8722121
  813. */
  814. HTMLAreaElement07: function(test) {
  815. var success;
  816. var nodeList;
  817. var testNode;
  818. var vtabindex;
  819. var doc;
  820. var docRef = null;
  821. if (typeof(this.doc) != 'undefined') {
  822. docRef = this.doc;
  823. }
  824. doc = load("area");
  825. nodeList = doc.getElementsByTagName("area");
  826. test.equal(nodeList.length, 1, 'Asize');
  827. testNode = nodeList.item(0);
  828. vtabindex = testNode.tabIndex;
  829. test.equal(vtabindex, 10, "tabIndexLink");
  830. test.done();
  831. },
  832. /**
  833. *
  834. The target specifies the frame to render the resource in.
  835. Retrieve the target attribute and examine it's value.
  836. * @author NIST
  837. * @author Rick Rivello
  838. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46054682
  839. */
  840. HTMLAreaElement08: function(test) {
  841. var success;
  842. var nodeList;
  843. var testNode;
  844. var vtarget;
  845. var doc;
  846. var docRef = null;
  847. if (typeof(this.doc) != 'undefined') {
  848. docRef = this.doc;
  849. }
  850. doc = load("area2");
  851. nodeList = doc.getElementsByTagName("area");
  852. test.equal(nodeList.length, 1, 'Asize');
  853. testNode = nodeList.item(0);
  854. vtarget = testNode.target;
  855. test.equal(vtarget, "dynamic", "targetLink");
  856. test.done();
  857. },
  858. /**
  859. *
  860. The clear attribute specifies control flow of text around floats.
  861. Retrieve the clear attribute and examine its value.
  862. * @author NIST
  863. * @author Mary Brady
  864. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82703081
  865. */
  866. HTMLBRElement01: function(test) {
  867. var success;
  868. var nodeList;
  869. var testNode;
  870. var vclear;
  871. var doc;
  872. var docRef = null;
  873. if (typeof(this.doc) != 'undefined') {
  874. docRef = this.doc;
  875. }
  876. doc = load("br");
  877. nodeList = doc.getElementsByTagName("br");
  878. test.equal(nodeList.length, 1, 'Asize');
  879. testNode = nodeList.item(0);
  880. vclear = testNode.clear;
  881. test.equal(vclear, "none", "clearLink");
  882. test.done();
  883. },
  884. /**
  885. *
  886. The href attribute specifies the base URI.
  887. Retrieve the href attribute and examine its value.
  888. * @author NIST
  889. * @author Mary Brady
  890. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65382887
  891. */
  892. HTMLBaseElement01: function(test) {
  893. var success;
  894. var nodeList;
  895. var testNode;
  896. var vhref;
  897. var doc;
  898. var docRef = null;
  899. if (typeof(this.doc) != 'undefined') {
  900. docRef = this.doc;
  901. }
  902. doc = load("base");
  903. nodeList = doc.getElementsByTagName("base");
  904. test.equal(nodeList.length, 1, 'Asize');
  905. testNode = nodeList.item(0);
  906. vhref = testNode.href;
  907. test.equal(vhref, "about:blank", "hrefLink");
  908. test.done();
  909. },
  910. /**
  911. *
  912. The target attribute specifies the default target frame.
  913. Retrieve the target attribute and examine its value.
  914. * @author NIST
  915. * @author Rick Rivello
  916. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73844298
  917. */
  918. HTMLBaseElement02: function(test) {
  919. var success;
  920. var nodeList;
  921. var testNode;
  922. var vtarget;
  923. var doc;
  924. var docRef = null;
  925. if (typeof(this.doc) != 'undefined') {
  926. docRef = this.doc;
  927. }
  928. doc = load("base2");
  929. nodeList = doc.getElementsByTagName("base");
  930. test.equal(nodeList.length, 1, 'Asize');
  931. testNode = nodeList.item(0);
  932. vtarget = testNode.target;
  933. test.equal(vtarget, "Frame1", "targetLink");
  934. test.done();
  935. },
  936. /**
  937. *
  938. The color attribute specifies the base font's color.
  939. Retrieve the color attribute and examine its value.
  940. * @author NIST
  941. * @author Mary Brady
  942. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87502302
  943. */
  944. HTMLBaseFontElement01: function(test) {
  945. var success;
  946. var nodeList;
  947. var testNode;
  948. var vcolor;
  949. var doc;
  950. var docRef = null;
  951. if (typeof(this.doc) != 'undefined') {
  952. docRef = this.doc;
  953. }
  954. doc = load("basefont");
  955. nodeList = doc.getElementsByTagName("basefont");
  956. test.equal(nodeList.length, 1, 'Asize');
  957. testNode = nodeList.item(0);
  958. vcolor = testNode.color;
  959. test.equal(vcolor, "#000000", "colorLink");
  960. test.done();
  961. },
  962. /**
  963. *
  964. The face attribute specifies the base font's face identifier.
  965. Retrieve the face attribute and examine its value.
  966. * @author NIST
  967. * @author Mary Brady
  968. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88128969
  969. */
  970. HTMLBaseFontElement02: function(test) {
  971. var success;
  972. var nodeList;
  973. var testNode;
  974. var vface;
  975. var doc;
  976. var docRef = null;
  977. if (typeof(this.doc) != 'undefined') {
  978. docRef = this.doc;
  979. }
  980. doc = load("basefont");
  981. nodeList = doc.getElementsByTagName("basefont");
  982. test.equal(nodeList.length, 1, 'Asize');
  983. testNode = nodeList.item(0);
  984. vface = testNode.face;
  985. test.equal(vface, "arial,helvitica", "faceLink");
  986. test.done();
  987. },
  988. /**
  989. *
  990. The size attribute specifies the base font's size.
  991. Retrieve the size attribute and examine it's value.
  992. * @author NIST
  993. * @author Mary Brady
  994. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-38930424
  995. */
  996. HTMLBaseFontElement03: function(test) {
  997. var success;
  998. var nodeList;
  999. var testNode;
  1000. var vsize;
  1001. var doc;
  1002. var docRef = null;
  1003. if (typeof(this.doc) != 'undefined') {
  1004. docRef = this.doc;
  1005. }
  1006. doc = load("basefont");
  1007. nodeList = doc.getElementsByTagName("basefont");
  1008. test.equal(nodeList.length, 1, 'Asize');
  1009. testNode = nodeList.item(0);
  1010. vsize = testNode.size;
  1011. test.equal(vsize, 4, "sizeLink");
  1012. test.done();
  1013. },
  1014. /**
  1015. *
  1016. The aLink attribute specifies the color of active links.
  1017. Retrieve the aLink attribute and examine its value.
  1018. * @author NIST
  1019. * @author Mary Brady
  1020. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59424581
  1021. */
  1022. HTMLBodyElement01: function(test) {
  1023. var success;
  1024. var nodeList;
  1025. var testNode;
  1026. var valink;
  1027. var doc;
  1028. var docRef = null;
  1029. if (typeof(this.doc) != 'undefined') {
  1030. docRef = this.doc;
  1031. }
  1032. doc = load("body");
  1033. nodeList = doc.getElementsByTagName("body");
  1034. test.equal(nodeList.length, 1, 'Asize');
  1035. testNode = nodeList.item(0);
  1036. valink = testNode.aLink;
  1037. test.equal(valink, "#0000ff", "aLinkLink");
  1038. test.done();
  1039. },
  1040. /**
  1041. *
  1042. The background attribute specifies the URI fo the background texture
  1043. tile image.
  1044. Retrieve the background attribute and examine its value.
  1045. * @author NIST
  1046. * @author Mary Brady
  1047. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-37574810
  1048. */
  1049. HTMLBodyElement02: function(test) {
  1050. var success;
  1051. var nodeList;
  1052. var testNode;
  1053. var vbackground;
  1054. var doc;
  1055. var docRef = null;
  1056. if (typeof(this.doc) != 'undefined') {
  1057. docRef = this.doc;
  1058. }
  1059. doc = load("body");
  1060. nodeList = doc.getElementsByTagName("body");
  1061. test.equal(nodeList.length, 1, 'Asize');
  1062. testNode = nodeList.item(0);
  1063. vbackground = testNode.background;
  1064. test.equal(vbackground, "./pix/back1.gif", "backgroundLink");
  1065. test.done();
  1066. },
  1067. /**
  1068. *
  1069. The bgColor attribute specifies the document background color.
  1070. Retrieve the bgColor attribute and examine its value.
  1071. * @author NIST
  1072. * @author Mary Brady
  1073. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-24940084
  1074. */
  1075. HTMLBodyElement03: function(test) {
  1076. var success;
  1077. var nodeList;
  1078. var testNode;
  1079. var vbgcolor;
  1080. var doc;
  1081. var docRef = null;
  1082. if (typeof(this.doc) != 'undefined') {
  1083. docRef = this.doc;
  1084. }
  1085. doc = load("body");
  1086. nodeList = doc.getElementsByTagName("body");
  1087. test.equal(nodeList.length, 1, 'Asize');
  1088. testNode = nodeList.item(0);
  1089. vbgcolor = testNode.bgColor;
  1090. test.equal(vbgcolor, "#ffff00", "bgColorLink");
  1091. test.done();
  1092. },
  1093. /**
  1094. *
  1095. The link attribute specifies the color of links that are not active
  1096. and unvisited.
  1097. Retrieve the link attribute and examine its value.
  1098. * @author NIST
  1099. * @author Mary Brady
  1100. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7662206
  1101. */
  1102. HTMLBodyElement04: function(test) {
  1103. var success;
  1104. var nodeList;
  1105. var testNode;
  1106. var vlink;
  1107. var doc;
  1108. var docRef = null;
  1109. if (typeof(this.doc) != 'undefined') {
  1110. docRef = this.doc;
  1111. }
  1112. doc = load("body");
  1113. nodeList = doc.getElementsByTagName("body");
  1114. test.equal(nodeList.length, 1, 'Asize');
  1115. testNode = nodeList.item(0);
  1116. vlink = testNode.link;
  1117. test.equal(vlink, "#ff0000", "linkLink");
  1118. test.done();
  1119. },
  1120. /**
  1121. *
  1122. The text attribute specifies the document text color.
  1123. Retrieve the text attribute and examine its value.
  1124. * @author NIST
  1125. * @author Mary Brady
  1126. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73714763
  1127. */
  1128. HTMLBodyElement05: function(test) {
  1129. var success;
  1130. var nodeList;
  1131. var testNode;
  1132. var vtext;
  1133. var doc;
  1134. var docRef = null;
  1135. if (typeof(this.doc) != 'undefined') {
  1136. docRef = this.doc;
  1137. }
  1138. doc = load("body");
  1139. nodeList = doc.getElementsByTagName("body");
  1140. test.equal(nodeList.length, 1, 'Asize');
  1141. testNode = nodeList.item(0);
  1142. vtext = testNode.text;
  1143. test.equal(vtext, "#000000", "textLink");
  1144. test.done();
  1145. },
  1146. /**
  1147. *
  1148. The vLink attribute specifies the color of links that have been
  1149. visited by the user.
  1150. Retrieve the vLink attribute and examine its value.
  1151. * @author NIST
  1152. * @author Mary Brady
  1153. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83224305
  1154. */
  1155. HTMLBodyElement06: function(test) {
  1156. var success;
  1157. var nodeList;
  1158. var testNode;
  1159. var vvlink;
  1160. var doc;
  1161. var docRef = null;
  1162. if (typeof(this.doc) != 'undefined') {
  1163. docRef = this.doc;
  1164. }
  1165. doc = load("body");
  1166. nodeList = doc.getElementsByTagName("body");
  1167. test.equal(nodeList.length, 1, 'Asize');
  1168. testNode = nodeList.item(0);
  1169. vvlink = testNode.vLink;
  1170. test.equal(vvlink, "#00ffff", "vLinkLink");
  1171. test.done();
  1172. },
  1173. /**
  1174. *
  1175. Checks that Node.isSupported("hTmL", null) returns true.
  1176. * @author Curt Arnold
  1177. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  1178. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-62018039
  1179. */
  1180. HTMLBodyElement07: function(test) {
  1181. var success;
  1182. var doc;
  1183. var body;
  1184. var state;
  1185. var version = null;
  1186. var docRef = null;
  1187. if (typeof(this.doc) != 'undefined') {
  1188. docRef = this.doc;
  1189. }
  1190. doc = load("document");
  1191. body = doc.body;
  1192. state = body.isSupported("hTmL",version);
  1193. test.ok(state, 'isSupportedHTML');
  1194. test.done();
  1195. },
  1196. /**
  1197. *
  1198. Checks that Node.isSupported("hTmL", "2.0") returns true.
  1199. * @author Curt Arnold
  1200. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  1201. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-62018039
  1202. */
  1203. HTMLBodyElement08: function(test) {
  1204. var success;
  1205. var doc;
  1206. var body;
  1207. var state;
  1208. var version = "2.0";
  1209. var docRef = null;
  1210. if (typeof(this.doc) != 'undefined') {
  1211. docRef = this.doc;
  1212. }
  1213. doc = load("document");
  1214. body = doc.body;
  1215. state = body.isSupported("hTmL",version);
  1216. test.ok(state, 'isSupportedHTML');
  1217. test.done();
  1218. },
  1219. /**
  1220. *
  1221. Checks that Node.isSupported("xhTmL", null) returns true if hasFeature("XML", null) is true.
  1222. * @author Curt Arnold
  1223. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  1224. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-62018039
  1225. */
  1226. HTMLBodyElement09: function(test) {
  1227. var success;
  1228. var doc;
  1229. var body;
  1230. var state;
  1231. var hasXML;
  1232. var version = null;
  1233. var docRef = null;
  1234. if (typeof(this.doc) != 'undefined') {
  1235. docRef = this.doc;
  1236. }
  1237. doc = load("document");
  1238. body = doc.body;
  1239. hasXML = body.isSupported("XML",version);
  1240. state = body.isSupported("xhTmL",version);
  1241. test.equal(state, hasXML, "isSupportedXHTML");
  1242. test.done();
  1243. },
  1244. /**
  1245. *
  1246. Checks that Node.isSupported("xhTmL", "2.0") returns true if hasFeature("XML", "2.0") is true.
  1247. * @author Curt Arnold
  1248. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  1249. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-62018039
  1250. */
  1251. HTMLBodyElement10: function(test) {
  1252. var success;
  1253. var doc;
  1254. var body;
  1255. var state;
  1256. var hasXML;
  1257. var version = "2.0";
  1258. var docRef = null;
  1259. if (typeof(this.doc) != 'undefined') {
  1260. docRef = this.doc;
  1261. }
  1262. doc = load("document");
  1263. body = doc.body;
  1264. hasXML = body.isSupported("XML",version);
  1265. state = body.isSupported("xhTmL",version);
  1266. test.equal(state, hasXML, "isSupportedXHTML");
  1267. test.done();
  1268. },
  1269. /**
  1270. *
  1271. Checks that Node.isSupported("cOrE", null) returns true.
  1272. * @author Curt Arnold
  1273. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  1274. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-62018039
  1275. */
  1276. HTMLBodyElement11: function(test) {
  1277. var success;
  1278. var doc;
  1279. var body;
  1280. var state;
  1281. var version = null;
  1282. var docRef = null;
  1283. if (typeof(this.doc) != 'undefined') {
  1284. docRef = this.doc;
  1285. }
  1286. doc = load("document");
  1287. body = doc.body;
  1288. state = body.isSupported("cOrE",version);
  1289. test.ok(state, 'isSupportedCore');
  1290. test.done();
  1291. },
  1292. /**
  1293. *
  1294. Checks that Node.isSupported("cOrE", "2.0") returns true.
  1295. * @author Curt Arnold
  1296. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  1297. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-62018039
  1298. */
  1299. HTMLBodyElement12: function(test) {
  1300. var success;
  1301. var doc;
  1302. var body;
  1303. var state;
  1304. var version = "2.0";
  1305. var docRef = null;
  1306. if (typeof(this.doc) != 'undefined') {
  1307. docRef = this.doc;
  1308. }
  1309. doc = load("document");
  1310. body = doc.body;
  1311. state = body.isSupported("cOrE",version);
  1312. test.ok(state, 'isSupportedCore');
  1313. test.done();
  1314. },
  1315. /**
  1316. *
  1317. The form attribute returns the FORM element containing this control.
  1318. Retrieve the form attribute and examine its value.
  1319. * @author NIST
  1320. * @author Mary Brady
  1321. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
  1322. */
  1323. HTMLButtonElement01: function(test) {
  1324. var success;
  1325. var nodeList;
  1326. var testNode;
  1327. var fNode;
  1328. var vform;
  1329. var doc;
  1330. var docRef = null;
  1331. if (typeof(this.doc) != 'undefined') {
  1332. docRef = this.doc;
  1333. }
  1334. doc = load("button");
  1335. nodeList = doc.getElementsByTagName("button");
  1336. test.equal(nodeList.length, 2, 'Asize');
  1337. testNode = nodeList.item(0);
  1338. fNode = testNode.form;
  1339. vform = fNode.id;
  1340. test.equal(vform, "form2", "formLink");
  1341. test.done();
  1342. },
  1343. /**
  1344. *
  1345. The form attribute returns null if control in not within the context of
  1346. form.
  1347. Retrieve the form attribute and examine its value.
  1348. * @author NIST
  1349. * @author Mary Brady
  1350. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
  1351. */
  1352. HTMLButtonElement02: function(test) {
  1353. var success;
  1354. var nodeList;
  1355. var testNode;
  1356. var vform;
  1357. var doc;
  1358. var docRef = null;
  1359. if (typeof(this.doc) != 'undefined') {
  1360. docRef = this.doc;
  1361. }
  1362. doc = load("button");
  1363. nodeList = doc.getElementsByTagName("button");
  1364. test.equal(nodeList.length, 2, 'Asize');
  1365. testNode = nodeList.item(1);
  1366. vform = testNode.form;
  1367. test.equal(vform, null, 'vform should be null');
  1368. test.done();
  1369. },
  1370. /**
  1371. *
  1372. The accessKey attribute returns a single character access key to
  1373. give access to the form control.
  1374. Retrieve the accessKey attribute and examine its value.
  1375. * @author NIST
  1376. * @author Mary Brady
  1377. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73169431
  1378. */
  1379. HTMLButtonElement03: function(test) {
  1380. var success;
  1381. var nodeList;
  1382. var testNode;
  1383. var vaccesskey;
  1384. var doc;
  1385. var docRef = null;
  1386. if (typeof(this.doc) != 'undefined') {
  1387. docRef = this.doc;
  1388. }
  1389. doc = load("button");
  1390. nodeList = doc.getElementsByTagName("button");
  1391. test.equal(nodeList.length, 2, 'Asize');
  1392. testNode = nodeList.item(0);
  1393. vaccesskey = testNode.accessKey;
  1394. test.equal(vaccesskey, "f", "accessKeyLink");
  1395. test.done();
  1396. },
  1397. /**
  1398. *
  1399. The disabled attribute specifies whether the control is unavailable
  1400. in this context.
  1401. Retrieve the disabled attribute and examine its value.
  1402. * @author NIST
  1403. * @author Mary Brady
  1404. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92757155
  1405. */
  1406. HTMLButtonElement04: function(test) {
  1407. var success;
  1408. var nodeList;
  1409. var testNode;
  1410. var vdisabled;
  1411. var doc;
  1412. var docRef = null;
  1413. if (typeof(this.doc) != 'undefined') {
  1414. docRef = this.doc;
  1415. }
  1416. doc = load("button");
  1417. nodeList = doc.getElementsByTagName("button");
  1418. test.equal(nodeList.length, 2, 'Asize');
  1419. testNode = nodeList.item(0);
  1420. vdisabled = testNode.disabled;
  1421. test.ok(vdisabled, 'disabledLink');
  1422. test.done();
  1423. },
  1424. /**
  1425. *
  1426. The name attribute is the form control or object name when submitted
  1427. with a form.
  1428. Retrieve the name attribute and examine its value.
  1429. * @author NIST
  1430. * @author Mary Brady
  1431. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11029910
  1432. */
  1433. HTMLButtonElement05: function(test) {
  1434. var success;
  1435. var nodeList;
  1436. var testNode;
  1437. var vname;
  1438. var doc;
  1439. var docRef = null;
  1440. if (typeof(this.doc) != 'undefined') {
  1441. docRef = this.doc;
  1442. }
  1443. doc = load("button");
  1444. nodeList = doc.getElementsByTagName("button");
  1445. test.equal(nodeList.length, 2, 'Asize');
  1446. testNode = nodeList.item(0);
  1447. vname = testNode.name;
  1448. test.equal(vname, "disabledButton", "nameLink");
  1449. test.done();
  1450. },
  1451. /**
  1452. *
  1453. The tabIndex attribute specifies an index that represents the element's
  1454. position in the tabbing order.
  1455. Retrieve the tabIndex attribute and examine its value.
  1456. * @author NIST
  1457. * @author Mary Brady
  1458. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39190908
  1459. */
  1460. HTMLButtonElement06: function(test) {
  1461. var success;
  1462. var nodeList;
  1463. var testNode;
  1464. var vtabindex;
  1465. var doc;
  1466. var docRef = null;
  1467. if (typeof(this.doc) != 'undefined') {
  1468. docRef = this.doc;
  1469. }
  1470. doc = load("button");
  1471. nodeList = doc.getElementsByTagName("button");
  1472. test.equal(nodeList.length, 2, 'Asize');
  1473. testNode = nodeList.item(0);
  1474. vtabindex = testNode.tabIndex;
  1475. test.equal(vtabindex, 20, "tabIndexLink");
  1476. test.done();
  1477. },
  1478. /**
  1479. *
  1480. The type attribute specifies the type of button.
  1481. Retrieve the type attribute and examine its value.
  1482. * @author NIST
  1483. * @author Mary Brady
  1484. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27430092
  1485. */
  1486. HTMLButtonElement07: function(test) {
  1487. var success;
  1488. var nodeList;
  1489. var testNode;
  1490. var vtype;
  1491. var doc;
  1492. var docRef = null;
  1493. if (typeof(this.doc) != 'undefined') {
  1494. docRef = this.doc;
  1495. }
  1496. doc = load("button");
  1497. nodeList = doc.getElementsByTagName("button");
  1498. test.equal(nodeList.length, 2, 'Asize');
  1499. testNode = nodeList.item(0);
  1500. vtype = testNode.type;
  1501. test.equal(vtype, "reset", "typeLink");
  1502. test.done();
  1503. },
  1504. /**
  1505. *
  1506. The value attribute specifies the current control value.
  1507. Retrieve the value attribute and examine its value.
  1508. * @author NIST
  1509. * @author Mary Brady
  1510. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72856782
  1511. */
  1512. HTMLButtonElement08: function(test) {
  1513. var success;
  1514. var nodeList;
  1515. var testNode;
  1516. var vvalue;
  1517. var doc;
  1518. var docRef = null;
  1519. if (typeof(this.doc) != 'undefined') {
  1520. docRef = this.doc;
  1521. }
  1522. doc = load("button");
  1523. nodeList = doc.getElementsByTagName("button");
  1524. test.equal(nodeList.length, 2, 'Asize');
  1525. testNode = nodeList.item(0);
  1526. vvalue = testNode.value;
  1527. test.equal(vvalue, "Reset Disabled Button", "valueLink");
  1528. test.done();
  1529. },
  1530. /**
  1531. *
  1532. An individual node may be accessed by either ordinal index, the node's
  1533. name or id attributes. (Test ordinal index).
  1534. Retrieve the first TABLE element and create a HTMLCollection by invoking
  1535. the "rows" attribute. The item located at ordinal index 0 is further
  1536. retrieved and its "rowIndex" attribute is examined.
  1537. * @author NIST
  1538. * @author Rick Rivello
  1539. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
  1540. */
  1541. HTMLCollection01: function(test) {
  1542. var success;
  1543. var nodeList;
  1544. var testNode;
  1545. var rowNode;
  1546. var rowsnodeList;
  1547. var vrowindex;
  1548. var doc;
  1549. var docRef = null;
  1550. if (typeof(this.doc) != 'undefined') {
  1551. docRef = this.doc;
  1552. }
  1553. doc = load("collection");
  1554. nodeList = doc.getElementsByTagName("table");
  1555. test.equal(nodeList.length, 1, 'Asize');
  1556. testNode = nodeList.item(0);
  1557. rowsnodeList = testNode.rows;
  1558. rowNode = rowsnodeList.item(0);
  1559. vrowindex = rowNode.rowIndex;
  1560. test.equal(vrowindex, 0, "rowIndexLink");
  1561. test.done();
  1562. },
  1563. /**
  1564. *
  1565. An individual node may be accessed by either ordinal index, the node's
  1566. name or id attributes. (Test node name).
  1567. Retrieve the first FORM element and create a HTMLCollection by invoking
  1568. the elements attribute. The first SELECT element is further retrieved
  1569. using the elements name attribute.
  1570. * @author NIST
  1571. * @author Rick Rivello
  1572. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479
  1573. */
  1574. HTMLCollection02: function(test) {
  1575. var success;
  1576. var nodeList;
  1577. var testNode;
  1578. var formNode;
  1579. var formsnodeList;
  1580. var vname;
  1581. var doc;
  1582. var docRef = null;
  1583. if (typeof(this.doc) != 'undefined') {
  1584. docRef = this.doc;
  1585. }
  1586. doc = load("collection");
  1587. nodeList = doc.getElementsByTagName("form");
  1588. test.equal(nodeList.length, 1, 'Asize');
  1589. testNode = nodeList.item(0);
  1590. formsnodeList = testNode.elements;
  1591. formNode = formsnodeList.namedItem("select1");
  1592. vname = formNode.nodeName;
  1593. test.equal(vname, 'SELECT', 'nameIndexLink');
  1594. test.done();
  1595. },
  1596. /**
  1597. *
  1598. An individual node may be accessed by either ordinal index, the node's
  1599. name or id attributes. (Test id attribute).
  1600. Retrieve the first FORM element and create a HTMLCollection by invoking
  1601. the "element" attribute. The first SELECT element is further retrieved
  1602. using the elements id.
  1603. * @author NIST
  1604. * @author Rick Rivello
  1605. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976
  1606. */
  1607. HTMLCollection03: function(test) {
  1608. var success;
  1609. var nodeList;
  1610. var testNode;
  1611. var formNode;
  1612. var formsnodeList;
  1613. var vname;
  1614. var doc;
  1615. var docRef = null;
  1616. if (typeof(this.doc) != 'undefined') {
  1617. docRef = this.doc;
  1618. }
  1619. doc = load("collection");
  1620. nodeList = doc.getElementsByTagName("form");
  1621. test.equal(nodeList.length, 1, 'Asize');
  1622. testNode = nodeList.item(0);
  1623. formsnodeList = testNode.elements;
  1624. formNode = formsnodeList.namedItem("selectId");
  1625. vname = formNode.nodeName;
  1626. test.equal(vname, 'SELECT', 'nameIndexLink');
  1627. test.done();
  1628. },
  1629. /**
  1630. *
  1631. HTMLCollections are live, they are automatically updated when the
  1632. underlying document is changed.
  1633. Create a HTMLCollection object by invoking the rows attribute of the
  1634. first TABLE element and examine its length, then add a new row and
  1635. re-examine the length.
  1636. * @author NIST
  1637. * @author Rick Rivello
  1638. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40057551
  1639. */
  1640. HTMLCollection04: function(test) {
  1641. var success;
  1642. var nodeList;
  1643. var testNode;
  1644. var rowLength1;
  1645. var rowLength2;
  1646. var rowsnodeList;
  1647. var newRow;
  1648. var vrowindex;
  1649. var doc;
  1650. var result = new Array();
  1651. expectedResult = new Array();
  1652. expectedResult[0] = 4;
  1653. expectedResult[1] = 5;
  1654. var docRef = null;
  1655. if (typeof(this.doc) != 'undefined') {
  1656. docRef = this.doc;
  1657. }
  1658. doc = load("collection");
  1659. nodeList = doc.getElementsByTagName("table");
  1660. test.equal(nodeList.length, 1, 'Asize');
  1661. testNode = nodeList.item(0);
  1662. rowsnodeList = testNode.rows;
  1663. rowLength1 = rowsnodeList.length;
  1664. result[result.length] = rowLength1;
  1665. newRow = testNode.insertRow(4);
  1666. rowLength2 = rowsnodeList.length;
  1667. result[result.length] = rowLength2;
  1668. test.deepEqual(result, expectedResult, 'rowIndexLink');
  1669. test.done();
  1670. },
  1671. /**
  1672. *
  1673. The length attribute specifies the length or size of the list.
  1674. Retrieve the first TABLE element and create a HTMLCollection by invoking
  1675. the "rows" attribute. Retrieve the length attribute of the HTMLCollection
  1676. object.
  1677. * @author NIST
  1678. * @author Rick Rivello
  1679. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40057551
  1680. */
  1681. HTMLCollection05: function(test) {
  1682. var success;
  1683. var nodeList;
  1684. var testNode;
  1685. var rowsnodeList;
  1686. var rowLength;
  1687. var doc;
  1688. var docRef = null;
  1689. if (typeof(this.doc) != 'undefined') {
  1690. docRef = this.doc;
  1691. }
  1692. doc = load("collection");
  1693. nodeList = doc.getElementsByTagName("table");
  1694. test.equal(nodeList.length, 1, 'Asize');
  1695. testNode = nodeList.item(0);
  1696. rowsnodeList = testNode.rows;
  1697. rowLength = rowsnodeList.length;
  1698. test.equal(rowLength, 4, "rowIndexLink");
  1699. test.done();
  1700. },
  1701. /**
  1702. *
  1703. An item(index) method retrieves an item specified by ordinal index
  1704. (Test for index=0).
  1705. Retrieve the first TABLE element and create a HTMLCollection by invoking
  1706. the "rows" attribute. The item located at ordinal index 0 is further
  1707. retrieved and its "rowIndex" attribute is examined.
  1708. * @author NIST
  1709. * @author Rick Rivello
  1710. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6156016
  1711. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
  1712. */
  1713. HTMLCollection06: function(test) {
  1714. var success;
  1715. var nodeList;
  1716. var testNode;
  1717. var rowNode;
  1718. var rowsnodeList;
  1719. var vrowindex;
  1720. var doc;
  1721. var docRef = null;
  1722. if (typeof(this.doc) != 'undefined') {
  1723. docRef = this.doc;
  1724. }
  1725. doc = load("collection");
  1726. nodeList = doc.getElementsByTagName("table");
  1727. test.equal(nodeList.length, 1, 'Asize');
  1728. testNode = nodeList.item(0);
  1729. rowsnodeList = testNode.rows;
  1730. rowNode = rowsnodeList.item(0);
  1731. vrowindex = rowNode.rowIndex;
  1732. test.equal(vrowindex, 0, "rowIndexLink");
  1733. test.done();
  1734. },
  1735. /**
  1736. *
  1737. An item(index) method retrieves an item specified by ordinal index
  1738. (Test for index=3).
  1739. Retrieve the first TABLE element and create a HTMLCollection by invoking
  1740. the "rows" attribute. The item located at ordinal index 3 is further
  1741. retrieved and its "rowIndex" attribute is examined.
  1742. * @author NIST
  1743. * @author Rick Rivello
  1744. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
  1745. */
  1746. HTMLCollection07: function(test) {
  1747. var success;
  1748. var nodeList;
  1749. var testNode;
  1750. var rowNode;
  1751. var rowsnodeList;
  1752. var vrowindex;
  1753. var doc;
  1754. var docRef = null;
  1755. if (typeof(this.doc) != 'undefined') {
  1756. docRef = this.doc;
  1757. }
  1758. doc = load("collection");
  1759. nodeList = doc.getElementsByTagName("table");
  1760. test.equal(nodeList.length, 1, 'Asize');
  1761. testNode = nodeList.item(0);
  1762. rowsnodeList = testNode.rows;
  1763. rowNode = rowsnodeList.item(3);
  1764. vrowindex = rowNode.rowIndex;
  1765. test.equal(vrowindex, 3, "rowIndexLink");
  1766. test.done();
  1767. },
  1768. /**
  1769. *
  1770. Nodes in a HTMLCollection object are numbered in tree order.
  1771. (Depth-first traversal order).
  1772. Retrieve the first TABLE element and create a HTMLCollection by invoking
  1773. the "rows" attribute. Access the item in the third ordinal index. The
  1774. resulting rowIndex attribute is examined and should be two.
  1775. * @author NIST
  1776. * @author Rick Rivello
  1777. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
  1778. */
  1779. HTMLCollection08: function(test) {
  1780. var success;
  1781. var nodeList;
  1782. var testNode;
  1783. var rowNode;
  1784. var rowsnodeList;
  1785. var vrowindex;
  1786. var doc;
  1787. var docRef = null;
  1788. if (typeof(this.doc) != 'undefined') {
  1789. docRef = this.doc;
  1790. }
  1791. doc = load("collection");
  1792. nodeList = doc.getElementsByTagName("table");
  1793. test.equal(nodeList.length, 1, 'Asize');
  1794. testNode = nodeList.item(0);
  1795. rowsnodeList = testNode.rows;
  1796. rowNode = rowsnodeList.item(2);
  1797. vrowindex = rowNode.rowIndex;
  1798. test.equal(vrowindex, 2, "rowIndexLink");
  1799. test.done();
  1800. },
  1801. /**
  1802. *
  1803. The item(index) method returns null if the index is out of range.
  1804. Retrieve the first TABLE element and create a HTMLCollection by invoking
  1805. the "rows" attribute. Invoke the item(index) method with an index
  1806. of 5. This index is out of range and should return null.
  1807. * @author NIST
  1808. * @author Rick Rivello
  1809. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
  1810. */
  1811. HTMLCollection09: function(test) {
  1812. var success;
  1813. var nodeList;
  1814. var testNode;
  1815. var rowNode;
  1816. var rowsnodeList;
  1817. var vrowindex;
  1818. var doc;
  1819. var docRef = null;
  1820. if (typeof(this.doc) != 'undefined') {
  1821. docRef = this.doc;
  1822. }
  1823. doc = load("collection");
  1824. nodeList = doc.getElementsByTagName("table");
  1825. test.equal(nodeList.length, 1, 'Asize');
  1826. testNode = nodeList.item(0);
  1827. rowsnodeList = testNode.rows;
  1828. rowNode = rowsnodeList.item(5);
  1829. test.equal(rowNode, null, 'rowNode should be null');
  1830. test.done();
  1831. },
  1832. /**
  1833. *
  1834. The namedItem(name) method retrieves a node using a name. It first
  1835. searches for a node with a matching id attribute. If it doesn't find
  1836. one, it then searches for a Node with a matching name attribute, but only
  1837. on those elements that are allowed a name attribute.
  1838. Retrieve the first FORM element and create a HTMLCollection by invoking
  1839. the elements attribute. The first SELECT element is further retrieved
  1840. using the elements name attribute since the id attribute doesn't match.
  1841. * @author NIST
  1842. * @author Rick Rivello
  1843. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976
  1844. */
  1845. HTMLCollection10: function(test) {
  1846. var success;
  1847. var nodeList;
  1848. var testNode;
  1849. var formNode;
  1850. var formsnodeList;
  1851. var vname;
  1852. var doc;
  1853. var docRef = null;
  1854. if (typeof(this.doc) != 'undefined') {
  1855. docRef = this.doc;
  1856. }
  1857. doc = load("collection");
  1858. nodeList = doc.getElementsByTagName("form");
  1859. test.equal(nodeList.length, 1, 'Asize');
  1860. testNode = nodeList.item(0);
  1861. formsnodeList = testNode.elements;
  1862. formNode = formsnodeList.namedItem("select1");
  1863. vname = formNode.nodeName;
  1864. test.equal(vname, 'SELECT', 'nameIndexLink');
  1865. test.done();
  1866. },
  1867. /**
  1868. *
  1869. The namedItem(name) method retrieves a node using a name. It first
  1870. searches for a node with a matching id attribute. If it doesn't find
  1871. one, it then searches for a Node with a matching name attribute, but only
  1872. on those elements that are allowed a name attribute.
  1873. Retrieve the first FORM element and create a HTMLCollection by invoking
  1874. the elements attribute. The first SELECT element is further retrieved
  1875. using the elements id attribute.
  1876. * @author NIST
  1877. * @author Rick Rivello
  1878. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479
  1879. */
  1880. HTMLCollection11: function(test) {
  1881. var success;
  1882. var nodeList;
  1883. var testNode;
  1884. var formNode;
  1885. var formsnodeList;
  1886. var vname;
  1887. var doc;
  1888. var docRef = null;
  1889. if (typeof(this.doc) != 'undefined') {
  1890. docRef = this.doc;
  1891. }
  1892. doc = load("collection");
  1893. nodeList = doc.getElementsByTagName("form");
  1894. test.equal(nodeList.length, 1, 'Asize');
  1895. testNode = nodeList.item(0);
  1896. formsnodeList = testNode.elements;
  1897. formNode = formsnodeList.namedItem("selectId");
  1898. vname = formNode.nodeName;
  1899. test.equal(vname, 'SELECT', 'nameIndexLink');
  1900. test.done();
  1901. },
  1902. /**
  1903. *
  1904. The namedItem(name) method retrieves a node using a name. It first
  1905. searches for a node with a matching id attribute. If it doesn't find
  1906. one, it then searches for a Node with a matching name attribute, but only
  1907. on those elements that are allowed a name attribute. If there isn't
  1908. a matching node the method returns null.
  1909. Retrieve the first FORM element and create a HTMLCollection by invoking
  1910. the elements attribute. The method returns null since there is not a
  1911. match of the name or id attribute.
  1912. * @author NIST
  1913. * @author Rick Rivello
  1914. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976
  1915. */
  1916. HTMLCollection12: function(test) {
  1917. var success;
  1918. var nodeList;
  1919. var testNode;
  1920. var formNode;
  1921. var formsnodeList;
  1922. var doc;
  1923. var docRef = null;
  1924. if (typeof(this.doc) != 'undefined') {
  1925. docRef = this.doc;
  1926. }
  1927. doc = load("collection");
  1928. nodeList = doc.getElementsByTagName("form");
  1929. test.equal(nodeList.length, 1, 'Asize');
  1930. testNode = nodeList.item(0);
  1931. formsnodeList = testNode.elements;
  1932. formNode = formsnodeList.namedItem("select9");
  1933. test.equal(formNode, null, 'formNode should be null');
  1934. test.done();
  1935. },
  1936. /**
  1937. *
  1938. The compact attribute specifies a boolean value on whether to display
  1939. the list more compactly.
  1940. Retrieve the compact attribute and examine its value.
  1941. * @author NIST
  1942. * @author Mary Brady
  1943. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75317739
  1944. */
  1945. HTMLDirectoryElement01: function(test) {
  1946. var success;
  1947. var nodeList;
  1948. var testNode;
  1949. var vcompact;
  1950. var doc;
  1951. var docRef = null;
  1952. if (typeof(this.doc) != 'undefined') {
  1953. docRef = this.doc;
  1954. }
  1955. doc = load("directory");
  1956. nodeList = doc.getElementsByTagName("dir");
  1957. test.equal(nodeList.length, 1, 'Asize');
  1958. testNode = nodeList.item(0);
  1959. vcompact = testNode.compact;
  1960. test.ok(vcompact, 'compactLink');
  1961. test.done();
  1962. },
  1963. /**
  1964. *
  1965. The align attribute specifies the horizontal text alignment.
  1966. Retrieve the align attribute and examine its value.
  1967. * @author NIST
  1968. * @author Mary Brady
  1969. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70908791
  1970. */
  1971. HTMLDivElement01: function(test) {
  1972. var success;
  1973. var nodeList;
  1974. var testNode;
  1975. var valign;
  1976. var doc;
  1977. var docRef = null;
  1978. if (typeof(this.doc) != 'undefined') {
  1979. docRef = this.doc;
  1980. }
  1981. doc = load("div");
  1982. nodeList = doc.getElementsByTagName("div");
  1983. test.equal(nodeList.length, 1, 'Asize');
  1984. testNode = nodeList.item(0);
  1985. valign = testNode.align;
  1986. test.equal(valign, "center", "alignLink");
  1987. test.done();
  1988. },
  1989. /**
  1990. *
  1991. The compact attribute specifies a boolean value on whether to display
  1992. the list more compactly.
  1993. Retrieve the compact attribute and examine its value.
  1994. * @author NIST
  1995. * @author Mary Brady
  1996. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21738539
  1997. */
  1998. HTMLDlistElement01: function(test) {
  1999. var success;
  2000. var nodeList;
  2001. var testNode;
  2002. var vcompact;
  2003. var doc;
  2004. var docRef = null;
  2005. if (typeof(this.doc) != 'undefined') {
  2006. docRef = this.doc;
  2007. }
  2008. doc = load("dl");
  2009. nodeList = doc.getElementsByTagName("dl");
  2010. test.equal(nodeList.length, 1, 'Asize');
  2011. testNode = nodeList.item(0);
  2012. vcompact = testNode.compact;
  2013. test.ok(vcompact, 'compactLink');
  2014. test.done();
  2015. },
  2016. /**
  2017. *
  2018. The title attribute is the specified title as a string.
  2019. Retrieve the title attribute and examine its value.
  2020. * @author NIST
  2021. * @author Mary Brady
  2022. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18446827
  2023. */
  2024. HTMLDocument01: function(test) {
  2025. var success;
  2026. var nodeList;
  2027. var vtitle;
  2028. var doc;
  2029. var docRef = null;
  2030. if (typeof(this.doc) != 'undefined') {
  2031. docRef = this.doc;
  2032. }
  2033. doc = load("document");
  2034. vtitle = doc.title;
  2035. test.equal(vtitle, "NIST DOM HTML Test - DOCUMENT", "titleLink");
  2036. test.done();
  2037. },
  2038. /**
  2039. *
  2040. The referrer attribute returns the URI of the page that linked to this
  2041. page.
  2042. Retrieve the referrer attribute and examine its value.
  2043. * @author NIST
  2044. * @author Mary Brady
  2045. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95229140
  2046. */
  2047. HTMLDocument02: function(test) {
  2048. var success;
  2049. var nodeList;
  2050. var testNode;
  2051. var vreferrer;
  2052. var doc;
  2053. var docRef = null;
  2054. if (typeof(this.doc) != 'undefined') {
  2055. docRef = this.doc;
  2056. }
  2057. doc = load("document");
  2058. vreferrer = doc.referrer;
  2059. test.equal(vreferrer, "", "referrerLink");
  2060. test.done();
  2061. },
  2062. /**
  2063. *
  2064. The domain attribute specifies the domain name of the server that served
  2065. the document, or null if the server cannot be identified by a domain name.
  2066. Retrieve the domain attribute and examine its value.
  2067. * @author NIST
  2068. * @author Mary Brady
  2069. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-2250147
  2070. */
  2071. HTMLDocument03: function(test) {
  2072. var success;
  2073. var nodeList;
  2074. var testNode;
  2075. var vdomain;
  2076. var doc;
  2077. var docRef = null;
  2078. if (typeof(this.doc) != 'undefined') {
  2079. docRef = this.doc;
  2080. }
  2081. doc = load("document");
  2082. vdomain = doc.domain;
  2083. test.equal(vdomain, "", "domainLink");
  2084. test.done();
  2085. },
  2086. /**
  2087. *
  2088. The URL attribute specifies the absolute URI of the document.
  2089. Retrieve the URL attribute and examine its value.
  2090. * @author NIST
  2091. * @author Mary Brady
  2092. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46183437
  2093. */
  2094. HTMLDocument04: function(test) {
  2095. var success;
  2096. var nodeList;
  2097. var testNode;
  2098. var vurl;
  2099. var doc;
  2100. var docRef = null;
  2101. if (typeof(this.doc) != 'undefined') {
  2102. docRef = this.doc;
  2103. }
  2104. doc = load("document");
  2105. vurl = doc.URL;
  2106. test.equal(vurl, 'file://'+__dirname+'/html/files/document.html', 'URLLink');
  2107. test.done();
  2108. },
  2109. /**
  2110. *
  2111. The body attribute is the element that contains the content for the
  2112. document.
  2113. Retrieve the body attribute and examine its value for the id attribute.
  2114. * @author NIST
  2115. * @author Mary Brady
  2116. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-56360201
  2117. */
  2118. HTMLDocument05: function(test) {
  2119. var success;
  2120. var nodeList;
  2121. var testNode;
  2122. var vbody;
  2123. var vid;
  2124. var doc;
  2125. var docRef = null;
  2126. if (typeof(this.doc) != 'undefined') {
  2127. docRef = this.doc;
  2128. }
  2129. doc = load("document");
  2130. vbody = doc.body;
  2131. vid = vbody.id;
  2132. test.equal(vid, "TEST-BODY", "idLink");
  2133. test.done();
  2134. },
  2135. /**
  2136. *
  2137. The images attribute returns a collection of all IMG elements in a document.
  2138. Retrieve the images attribute from the document and examine its value.
  2139. * @author NIST
  2140. * @author Rick Rivello
  2141. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90379117
  2142. */
  2143. HTMLDocument07: function(test) {
  2144. var success;
  2145. var nodeList;
  2146. var testNode;
  2147. var vimages;
  2148. var vlength;
  2149. var doc;
  2150. var docRef = null;
  2151. if (typeof(this.doc) != 'undefined') {
  2152. docRef = this.doc;
  2153. }
  2154. doc = load("document");
  2155. vimages = doc.images;
  2156. vlength = vimages.length;
  2157. test.equal(vlength, 1, "lengthLink");
  2158. test.done();
  2159. },
  2160. /**
  2161. *
  2162. The applets attribute returns a collection of all OBJECT elements that
  2163. include applets abd APPLET elements in a document.
  2164. Retrieve the applets attribute from the document and examine its value.
  2165. * @author NIST
  2166. * @author Rick Rivello
  2167. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85113862
  2168. */
  2169. HTMLDocument08: function(test) {
  2170. var success;
  2171. var nodeList;
  2172. var testNode;
  2173. var vapplets;
  2174. var vlength;
  2175. var doc;
  2176. var docRef = null;
  2177. if (typeof(this.doc) != 'undefined') {
  2178. docRef = this.doc;
  2179. }
  2180. doc = load("document");
  2181. vapplets = doc.applets;
  2182. vlength = vapplets.length;
  2183. test.equal(vlength, 4, "length");
  2184. test.done();
  2185. },
  2186. /**
  2187. *
  2188. The links attribute returns a collection of all AREA and A elements
  2189. in a document with a value for the href attribute.
  2190. Retrieve the links attribute from the document and examine its value.
  2191. * @author NIST
  2192. * @author Rick Rivello
  2193. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7068919
  2194. */
  2195. HTMLDocument09: function(test) {
  2196. var success;
  2197. var nodeList;
  2198. var testNode;
  2199. var vlinks;
  2200. var vlength;
  2201. var doc;
  2202. var docRef = null;
  2203. if (typeof(this.doc) != 'undefined') {
  2204. docRef = this.doc;
  2205. }
  2206. doc = load("document");
  2207. vlinks = doc.links;
  2208. vlength = vlinks.length;
  2209. test.equal(vlength, 3, "lengthLink");
  2210. test.done();
  2211. },
  2212. /**
  2213. *
  2214. The forms attribute returns a collection of all the forms in a document.
  2215. Retrieve the forms attribute from the document and examine its value.
  2216. * @author NIST
  2217. * @author Rick Rivello
  2218. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-1689064
  2219. */
  2220. HTMLDocument10: function(test) {
  2221. var success;
  2222. var nodeList;
  2223. var testNode;
  2224. var vforms;
  2225. var vlength;
  2226. var doc;
  2227. var docRef = null;
  2228. if (typeof(this.doc) != 'undefined') {
  2229. docRef = this.doc;
  2230. }
  2231. doc = load("document");
  2232. vforms = doc.forms;
  2233. vlength = vforms.length;
  2234. test.equal(vlength, 1, "lengthLink");
  2235. test.done();
  2236. },
  2237. /**
  2238. *
  2239. The anchors attribute returns a collection of all A elements with values
  2240. for the name attribute.
  2241. Retrieve the anchors attribute from the document and examine its value.
  2242. * @author NIST
  2243. * @author Rick Rivello
  2244. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7577272
  2245. */
  2246. HTMLDocument11: function(test) {
  2247. var success;
  2248. var nodeList;
  2249. var testNode;
  2250. var vanchors;
  2251. var vlength;
  2252. var doc;
  2253. var docRef = null;
  2254. if (typeof(this.doc) != 'undefined') {
  2255. docRef = this.doc;
  2256. }
  2257. doc = load("document");
  2258. vanchors = doc.anchors;
  2259. vlength = vanchors.length;
  2260. test.equal(vlength, 1, "lengthLink");
  2261. test.done();
  2262. },
  2263. /**
  2264. *
  2265. The cookie attribute returns the cookies associated with this document.
  2266. Retrieve the cookie attribute and examine its value.
  2267. * @author NIST
  2268. * @author Rick Rivello
  2269. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8747038
  2270. */
  2271. HTMLDocument12: function(test) {
  2272. var success;
  2273. var nodeList;
  2274. var vcookie;
  2275. var doc;
  2276. var docRef = null;
  2277. if (typeof(this.doc) != 'undefined') {
  2278. docRef = this.doc;
  2279. }
  2280. doc = load("document");
  2281. vcookie = doc.cookie;
  2282. test.equal(vcookie, "", "cookieLink");
  2283. test.done();
  2284. },
  2285. /**
  2286. *
  2287. The getElementsByName method returns the (possibly empty) collection
  2288. of elements whose name value is given by the elementName.
  2289. Retrieve all the elements whose name attribute is "mapid".
  2290. Check the length of the nodelist. It should be 1.
  2291. * @author NIST
  2292. * @author Rick Rivello
  2293. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71555259
  2294. */
  2295. HTMLDocument13: function(test) {
  2296. var success;
  2297. var nodeList;
  2298. var doc;
  2299. var docRef = null;
  2300. if (typeof(this.doc) != 'undefined') {
  2301. docRef = this.doc;
  2302. }
  2303. doc = load("document");
  2304. nodeList = doc.getElementsByName("mapid");
  2305. test.equal(nodeList.length, 1, 'Asize');
  2306. test.done();
  2307. },
  2308. /**
  2309. *
  2310. The getElementsByName method returns the (possibly empty) collection
  2311. of elements whose name value is given by the elementName.
  2312. Retrieve all the elements whose name attribute is "noid".
  2313. Check the length of the nodelist. It should be 0 since
  2314. the id "noid" does not exist.
  2315. * @author NIST
  2316. * @author Rick Rivello
  2317. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71555259
  2318. */
  2319. HTMLDocument14: function(test) {
  2320. var success;
  2321. var nodeList;
  2322. var doc;
  2323. var docRef = null;
  2324. if (typeof(this.doc) != 'undefined') {
  2325. docRef = this.doc;
  2326. }
  2327. doc = load("document");
  2328. nodeList = doc.getElementsByName("noid");
  2329. test.equal(nodeList.length, 0, 'Asize');
  2330. test.done();
  2331. },
  2332. /**
  2333. *
  2334. The getElementById method returns the Element whose id is given by
  2335. elementId. If no such element exists, returns null.
  2336. Retrieve the element whose id is "mapid".
  2337. Check the value of the element.
  2338. * @author NIST
  2339. * @author Rick Rivello
  2340. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36113835
  2341. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
  2342. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId
  2343. */
  2344. HTMLDocument15: function(test) {
  2345. var success;
  2346. var elementNode;
  2347. var elementValue;
  2348. var doc;
  2349. var docRef = null;
  2350. if (typeof(this.doc) != 'undefined') {
  2351. docRef = this.doc;
  2352. }
  2353. doc = load("document");
  2354. elementNode = doc.getElementById("mapid");
  2355. elementValue = elementNode.nodeName;
  2356. test.equal(elementValue, 'MAP', 'elementId');
  2357. test.done();
  2358. },
  2359. /**
  2360. *
  2361. The getElementById method returns the Element whose id is given by
  2362. elementId. If no such element exists, returns null.
  2363. Retrieve the element whose id is "noid".
  2364. The value returned should be null since there are not any elements with
  2365. an id of "noid".
  2366. * @author NIST
  2367. * @author Rick Rivello
  2368. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36113835
  2369. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
  2370. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId
  2371. */
  2372. HTMLDocument16: function(test) {
  2373. var success;
  2374. var elementNode;
  2375. var elementValue;
  2376. var doc;
  2377. var docRef = null;
  2378. if (typeof(this.doc) != 'undefined') {
  2379. docRef = this.doc;
  2380. }
  2381. doc = load("document");
  2382. elementNode = doc.getElementById("noid");
  2383. test.equal(elementNode, null, 'elementNode should be null');
  2384. test.done();
  2385. },
  2386. /**
  2387. *
  2388. Clears the current document using HTMLDocument.open immediately followed by close.
  2389. * @author Curt Arnold
  2390. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170
  2391. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
  2392. */
  2393. HTMLDocument17: function(test) {
  2394. var success;
  2395. var doc;
  2396. var bodyElem;
  2397. var bodyChild;
  2398. var docRef = null;
  2399. if (typeof(this.doc) != 'undefined') {
  2400. docRef = this.doc;
  2401. }
  2402. doc = load("document");
  2403. doc.open();
  2404. doc.close();
  2405. bodyElem = doc.body;
  2406. if(
  2407. (bodyElem != null)
  2408. ) {
  2409. bodyChild = bodyElem.firstChild;
  2410. test.equal(bodyChild, null, 'bodyChild should be null');
  2411. }
  2412. test.done();
  2413. },
  2414. /**
  2415. *
  2416. Calls HTMLDocument.close on a document that has not been opened for modification.
  2417. * @author Curt Arnold
  2418. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
  2419. */
  2420. HTMLDocument18: function(test) {
  2421. var success;
  2422. var doc;
  2423. var docRef = null;
  2424. if (typeof(this.doc) != 'undefined') {
  2425. docRef = this.doc;
  2426. }
  2427. doc = load("document");
  2428. doc.close();
  2429. test.done();
  2430. },
  2431. /**
  2432. *
  2433. Replaces the current document with a valid HTML document using HTMLDocument.open, write and close.
  2434. * @author Curt Arnold
  2435. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170
  2436. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
  2437. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75233634
  2438. */
  2439. HTMLDocument19: function(test) {
  2440. var success;
  2441. var doc;
  2442. var docElem;
  2443. var title;
  2444. doc = load("document");
  2445. doc.open();
  2446. doc.write("<html>");
  2447. doc.write("<body>");
  2448. doc.write("<title>Replacement</title>");
  2449. doc.write("</body>");
  2450. doc.write("<p>");
  2451. doc.write("Hello, World.");
  2452. doc.write("</p>");
  2453. doc.write("</body>");
  2454. doc.write("</html>");
  2455. doc.close();
  2456. test.done();
  2457. },
  2458. /**
  2459. *
  2460. Replaces the current document with a valid HTML document using HTMLDocument.open, writeln and close.
  2461. * @author Curt Arnold
  2462. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170
  2463. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
  2464. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35318390
  2465. */
  2466. HTMLDocument20: function(test) {
  2467. var success;
  2468. var doc;
  2469. var docElem;
  2470. var title;
  2471. doc = load("document");
  2472. doc.open();
  2473. doc.writeln("<html>");
  2474. doc.writeln("<body>");
  2475. doc.writeln("<title>Replacement</title>");
  2476. doc.writeln("</body>");
  2477. doc.writeln("<p>");
  2478. doc.writeln("Hello, World.");
  2479. doc.writeln("</p>");
  2480. doc.writeln("</body>");
  2481. doc.writeln("</html>");
  2482. doc.close();
  2483. test.done();
  2484. },
  2485. /**
  2486. *
  2487. Replaces the current document checks that writeln adds a new line.
  2488. * @author Curt Arnold
  2489. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170
  2490. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
  2491. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75233634
  2492. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35318390
  2493. */
  2494. HTMLDocument21: function(test) {
  2495. var doc = load("document");
  2496. doc.open();
  2497. doc.writeln("<html>");
  2498. doc.writeln("<body>");
  2499. doc.writeln("<title>Replacement</title>");
  2500. doc.writeln("</body>");
  2501. doc.write("<pre>");
  2502. doc.writeln("Hello, World.");
  2503. doc.writeln("Hello, World.");
  2504. doc.writeln("</pre>");
  2505. doc.write("<pre>");
  2506. doc.write("Hello, World.");
  2507. doc.write("Hello, World.");
  2508. doc.writeln("</pre>");
  2509. doc.writeln("</body>");
  2510. doc.writeln("</html>");
  2511. doc.close();
  2512. test.done();
  2513. },
  2514. /**
  2515. *
  2516. Checks that Node.isSupported("hTmL", null) returns true.
  2517. * @author Curt Arnold
  2518. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  2519. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
  2520. */
  2521. HTMLDocument22: function(test) {
  2522. var success;
  2523. var doc;
  2524. var state;
  2525. var version = null;
  2526. var docRef = null;
  2527. if (typeof(this.doc) != 'undefined') {
  2528. docRef = this.doc;
  2529. }
  2530. doc = load("document");
  2531. state = doc.isSupported("hTmL",version);
  2532. test.ok(state, 'isSupportedHTML');
  2533. test.done();
  2534. },
  2535. /**
  2536. *
  2537. Checks that Node.isSupported("hTmL", "2.0") returns true.
  2538. * @author Curt Arnold
  2539. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  2540. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
  2541. */
  2542. HTMLDocument23: function(test) {
  2543. var success;
  2544. var doc;
  2545. var state;
  2546. var version = "2.0";
  2547. var docRef = null;
  2548. if (typeof(this.doc) != 'undefined') {
  2549. docRef = this.doc;
  2550. }
  2551. doc = load("document");
  2552. state = doc.isSupported("hTmL",version);
  2553. test.ok(state, 'isSupportedHTML');
  2554. test.done();
  2555. },
  2556. /**
  2557. *
  2558. Checks that Node.isSupported("xhTmL", null) returns true if hasFeature("XML", null) is true.
  2559. * @author Curt Arnold
  2560. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  2561. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
  2562. */
  2563. HTMLDocument24: function(test) {
  2564. var success;
  2565. var doc;
  2566. var state;
  2567. var hasXML;
  2568. var version = null;
  2569. var docRef = null;
  2570. if (typeof(this.doc) != 'undefined') {
  2571. docRef = this.doc;
  2572. }
  2573. doc = load("document");
  2574. hasXML = doc.isSupported("XML",version);
  2575. state = doc.isSupported("xhTmL",version);
  2576. test.equal(state, hasXML, "isSupportedXHTML");
  2577. test.done();
  2578. },
  2579. /**
  2580. *
  2581. Checks that Node.isSupported("xhTmL", "2.0") returns true if hasFeature("XML", "2.0") is true.
  2582. * @author Curt Arnold
  2583. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  2584. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
  2585. */
  2586. HTMLDocument25: function(test) {
  2587. var success;
  2588. var doc;
  2589. var state;
  2590. var hasXML;
  2591. var version = "2.0";
  2592. var docRef = null;
  2593. if (typeof(this.doc) != 'undefined') {
  2594. docRef = this.doc;
  2595. }
  2596. doc = load("document");
  2597. hasXML = doc.isSupported("XML",version);
  2598. state = doc.isSupported("xhTmL",version);
  2599. test.equal(state, hasXML, "isSupportedXHTML");
  2600. test.done();
  2601. },
  2602. /**
  2603. *
  2604. Checks that Node.isSupported("cOrE", null) returns true.
  2605. * @author Curt Arnold
  2606. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  2607. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
  2608. */
  2609. HTMLDocument26: function(test) {
  2610. var success;
  2611. var doc;
  2612. var state;
  2613. var version = null;
  2614. var docRef = null;
  2615. if (typeof(this.doc) != 'undefined') {
  2616. docRef = this.doc;
  2617. }
  2618. doc = load("document");
  2619. state = doc.isSupported("cOrE",version);
  2620. test.ok(state, 'isSupportedCore');
  2621. test.done();
  2622. },
  2623. /**
  2624. *
  2625. Checks that Node.isSupported("cOrE", "2.0") returns true.
  2626. * @author Curt Arnold
  2627. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports
  2628. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
  2629. */
  2630. HTMLDocument27: function(test) {
  2631. var success;
  2632. var doc;
  2633. var state;
  2634. var version = "2.0";
  2635. var docRef = null;
  2636. if (typeof(this.doc) != 'undefined') {
  2637. docRef = this.doc;
  2638. }
  2639. doc = load("document");
  2640. state = doc.isSupported("cOrE",version);
  2641. test.ok(state, 'isSupportedCore');
  2642. test.done();
  2643. },
  2644. /**
  2645. *
  2646. The id specifies the elements identifier.
  2647. Retrieve the id attribute of the HEAD element and examine its value.
  2648. * @author NIST
  2649. * @author Mary Brady
  2650. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2651. */
  2652. HTMLElement01: function(test) {
  2653. var success;
  2654. var nodeList;
  2655. var testNode;
  2656. var vid;
  2657. var doc;
  2658. var docRef = null;
  2659. if (typeof(this.doc) != 'undefined') {
  2660. docRef = this.doc;
  2661. }
  2662. doc = load("element");
  2663. nodeList = doc.getElementsByTagName("head");
  2664. test.equal(nodeList.length, 1, 'Asize');
  2665. testNode = nodeList.item(0);
  2666. vid = testNode.id;
  2667. test.equal(vid, "Test-HEAD", "idLink");
  2668. test.done();
  2669. },
  2670. /**
  2671. *
  2672. The id specifies the elements identifier.
  2673. Retrieve the id attribute of the SUB element and examine its value.
  2674. * @author NIST
  2675. * @author Mary Brady
  2676. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2677. */
  2678. HTMLElement02: function(test) {
  2679. var success;
  2680. var nodeList;
  2681. var testNode;
  2682. var vid;
  2683. var doc;
  2684. var docRef = null;
  2685. if (typeof(this.doc) != 'undefined') {
  2686. docRef = this.doc;
  2687. }
  2688. doc = load("element");
  2689. nodeList = doc.getElementsByTagName("sub");
  2690. test.equal(nodeList.length, 1, 'Asize');
  2691. testNode = nodeList.item(0);
  2692. vid = testNode.id;
  2693. test.equal(vid, "Test-SUB", "idLink");
  2694. test.done();
  2695. },
  2696. /**
  2697. *
  2698. The id specifies the elements identifier.
  2699. Retrieve the id attribute of the SUP element and examine its value.
  2700. * @author NIST
  2701. * @author Mary Brady
  2702. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2703. */
  2704. HTMLElement03: function(test) {
  2705. var success;
  2706. var nodeList;
  2707. var testNode;
  2708. var vid;
  2709. var doc;
  2710. var docRef = null;
  2711. if (typeof(this.doc) != 'undefined') {
  2712. docRef = this.doc;
  2713. }
  2714. doc = load("element");
  2715. nodeList = doc.getElementsByTagName("sup");
  2716. test.equal(nodeList.length, 1, 'Asize');
  2717. testNode = nodeList.item(0);
  2718. vid = testNode.id;
  2719. test.equal(vid, "Test-SUP", "idLink");
  2720. test.done();
  2721. },
  2722. /**
  2723. *
  2724. The id specifies the elements identifier.
  2725. Retrieve the id attribute of the SPAN element and examine its value.
  2726. * @author NIST
  2727. * @author Mary Brady
  2728. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2729. */
  2730. HTMLElement04: function(test) {
  2731. var success;
  2732. var nodeList;
  2733. var testNode;
  2734. var vid;
  2735. var doc;
  2736. var docRef = null;
  2737. if (typeof(this.doc) != 'undefined') {
  2738. docRef = this.doc;
  2739. }
  2740. doc = load("element");
  2741. nodeList = doc.getElementsByTagName("span");
  2742. test.equal(nodeList.length, 1, 'Asize');
  2743. testNode = nodeList.item(0);
  2744. vid = testNode.id;
  2745. test.equal(vid, "Test-SPAN", "idLink");
  2746. test.done();
  2747. },
  2748. /**
  2749. *
  2750. The id specifies the elements identifier.
  2751. Retrieve the id attribute of the BDO element and examine its value.
  2752. * @author NIST
  2753. * @author Mary Brady
  2754. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2755. */
  2756. HTMLElement05: function(test) {
  2757. var success;
  2758. var nodeList;
  2759. var testNode;
  2760. var vid;
  2761. var doc;
  2762. var docRef = null;
  2763. if (typeof(this.doc) != 'undefined') {
  2764. docRef = this.doc;
  2765. }
  2766. doc = load("element");
  2767. nodeList = doc.getElementsByTagName("bdo");
  2768. test.equal(nodeList.length, 1, 'Asize');
  2769. testNode = nodeList.item(0);
  2770. vid = testNode.id;
  2771. test.equal(vid, "Test-BDO", "idLink");
  2772. test.done();
  2773. },
  2774. /**
  2775. *
  2776. The id specifies the elements identifier.
  2777. Retrieve the id attribute of the TT element and examine its value.
  2778. * @author NIST
  2779. * @author Mary Brady
  2780. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2781. */
  2782. HTMLElement06: function(test) {
  2783. var success;
  2784. var nodeList;
  2785. var testNode;
  2786. var vid;
  2787. var doc;
  2788. var docRef = null;
  2789. if (typeof(this.doc) != 'undefined') {
  2790. docRef = this.doc;
  2791. }
  2792. doc = load("element");
  2793. nodeList = doc.getElementsByTagName("tt");
  2794. test.equal(nodeList.length, 1, 'Asize');
  2795. testNode = nodeList.item(0);
  2796. vid = testNode.id;
  2797. test.equal(vid, "Test-TT", "idLink");
  2798. test.done();
  2799. },
  2800. /**
  2801. *
  2802. The id specifies the elements identifier.
  2803. Retrieve the id attribute of the I element and examine its value.
  2804. * @author NIST
  2805. * @author Mary Brady
  2806. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2807. */
  2808. HTMLElement07: function(test) {
  2809. var success;
  2810. var nodeList;
  2811. var testNode;
  2812. var vid;
  2813. var doc;
  2814. var docRef = null;
  2815. if (typeof(this.doc) != 'undefined') {
  2816. docRef = this.doc;
  2817. }
  2818. doc = load("element");
  2819. nodeList = doc.getElementsByTagName("i");
  2820. test.equal(nodeList.length, 1, 'Asize');
  2821. testNode = nodeList.item(0);
  2822. vid = testNode.id;
  2823. test.equal(vid, "Test-I", "idLink");
  2824. test.done();
  2825. },
  2826. /**
  2827. *
  2828. The id specifies the elements identifier.
  2829. Retrieve the id attribute of the B element and examine its value.
  2830. * @author NIST
  2831. * @author Mary Brady
  2832. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2833. */
  2834. HTMLElement08: function(test) {
  2835. var success;
  2836. var nodeList;
  2837. var testNode;
  2838. var vid;
  2839. var doc;
  2840. var docRef = null;
  2841. if (typeof(this.doc) != 'undefined') {
  2842. docRef = this.doc;
  2843. }
  2844. doc = load("element");
  2845. nodeList = doc.getElementsByTagName("b");
  2846. test.equal(nodeList.length, 1, 'Asize');
  2847. testNode = nodeList.item(0);
  2848. vid = testNode.id;
  2849. test.equal(vid, "Test-B", "idLink");
  2850. test.done();
  2851. },
  2852. /**
  2853. *
  2854. The id specifies the elements identifier.
  2855. Retrieve the id attribute of the U element and examine its value.
  2856. * @author NIST
  2857. * @author Mary Brady
  2858. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2859. */
  2860. HTMLElement09: function(test) {
  2861. var success;
  2862. var nodeList;
  2863. var testNode;
  2864. var vid;
  2865. var doc;
  2866. var docRef = null;
  2867. if (typeof(this.doc) != 'undefined') {
  2868. docRef = this.doc;
  2869. }
  2870. doc = load("element");
  2871. nodeList = doc.getElementsByTagName("u");
  2872. test.equal(nodeList.length, 1, 'Asize');
  2873. testNode = nodeList.item(0);
  2874. vid = testNode.id;
  2875. test.equal(vid, "Test-U", "idLink");
  2876. test.done();
  2877. },
  2878. /**
  2879. *
  2880. The id specifies the elements identifier.
  2881. Retrieve the id attribute of the S element and examine its value.
  2882. * @author NIST
  2883. * @author Mary Brady
  2884. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  2885. */
  2886. HTMLElement10: function(test) {
  2887. var success;
  2888. var nodeList;
  2889. var testNode;
  2890. var vid;
  2891. var doc;
  2892. var docRef = null;
  2893. if (typeof(this.doc) != 'undefined') {
  2894. docRef = this.doc;
  2895. }
  2896. doc = load("element");
  2897. nodeList = doc.getElementsByTagName("s");
  2898. test.equal(nodeList.length, 1, 'Asize');
  2899. testNode = nodeList.item(0);
  2900. vid = testNode.id;
  2901. test.equal(vid, "Test-S", "idLink");
  2902. test.done();
  2903. },
  2904. /**
  2905. *
  2906. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  2907. Retrieve the dir attribute of the SMALL element and examine its value.
  2908. * @author NIST
  2909. * @author Mary Brady
  2910. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  2911. */
  2912. HTMLElement100: function(test) {
  2913. var success;
  2914. var nodeList;
  2915. var testNode;
  2916. var vdir;
  2917. var doc;
  2918. var docRef = null;
  2919. if (typeof(this.doc) != 'undefined') {
  2920. docRef = this.doc;
  2921. }
  2922. doc = load("element");
  2923. nodeList = doc.getElementsByTagName("small");
  2924. test.equal(nodeList.length, 1, 'Asize');
  2925. testNode = nodeList.item(0);
  2926. vdir = testNode.dir;
  2927. test.equal(vdir, "ltr", "dirLink");
  2928. test.done();
  2929. },
  2930. /**
  2931. *
  2932. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  2933. Retrieve the dir attribute of the EM element and examine its value.
  2934. * @author NIST
  2935. * @author Mary Brady
  2936. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  2937. */
  2938. HTMLElement101: function(test) {
  2939. var success;
  2940. var nodeList;
  2941. var testNode;
  2942. var vdir;
  2943. var doc;
  2944. var docRef = null;
  2945. if (typeof(this.doc) != 'undefined') {
  2946. docRef = this.doc;
  2947. }
  2948. doc = load("element");
  2949. nodeList = doc.getElementsByTagName("em");
  2950. test.equal(nodeList.length, 1, 'Asize');
  2951. testNode = nodeList.item(0);
  2952. vdir = testNode.dir;
  2953. test.equal(vdir, "ltr", "dirLink");
  2954. test.done();
  2955. },
  2956. /**
  2957. *
  2958. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  2959. Retrieve the dir attribute of the STRONG element and examine its value.
  2960. * @author NIST
  2961. * @author Mary Brady
  2962. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  2963. */
  2964. HTMLElement102: function(test) {
  2965. var success;
  2966. var nodeList;
  2967. var testNode;
  2968. var vdir;
  2969. var doc;
  2970. var docRef = null;
  2971. if (typeof(this.doc) != 'undefined') {
  2972. docRef = this.doc;
  2973. }
  2974. doc = load("element");
  2975. nodeList = doc.getElementsByTagName("strong");
  2976. test.equal(nodeList.length, 1, 'Asize');
  2977. testNode = nodeList.item(0);
  2978. vdir = testNode.dir;
  2979. test.equal(vdir, "ltr", "dirLink");
  2980. test.done();
  2981. },
  2982. /**
  2983. *
  2984. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  2985. Retrieve the dir attribute of the DFN element and examine its value.
  2986. * @author NIST
  2987. * @author Mary Brady
  2988. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  2989. */
  2990. HTMLElement103: function(test) {
  2991. var success;
  2992. var nodeList;
  2993. var testNode;
  2994. var vdir;
  2995. var doc;
  2996. var docRef = null;
  2997. if (typeof(this.doc) != 'undefined') {
  2998. docRef = this.doc;
  2999. }
  3000. doc = load("element");
  3001. nodeList = doc.getElementsByTagName("dfn");
  3002. test.equal(nodeList.length, 1, 'Asize');
  3003. testNode = nodeList.item(0);
  3004. vdir = testNode.dir;
  3005. test.equal(vdir, "ltr", "dirLink");
  3006. test.done();
  3007. },
  3008. /**
  3009. *
  3010. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3011. Retrieve the dir attribute of the CODE element and examine its value.
  3012. * @author NIST
  3013. * @author Mary Brady
  3014. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3015. */
  3016. HTMLElement104: function(test) {
  3017. var success;
  3018. var nodeList;
  3019. var testNode;
  3020. var vdir;
  3021. var doc;
  3022. var docRef = null;
  3023. if (typeof(this.doc) != 'undefined') {
  3024. docRef = this.doc;
  3025. }
  3026. doc = load("element");
  3027. nodeList = doc.getElementsByTagName("code");
  3028. test.equal(nodeList.length, 1, 'Asize');
  3029. testNode = nodeList.item(0);
  3030. vdir = testNode.dir;
  3031. test.equal(vdir, "ltr", "dirLink");
  3032. test.done();
  3033. },
  3034. /**
  3035. *
  3036. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3037. Retrieve the dir attribute of the SAMP element and examine its value.
  3038. * @author NIST
  3039. * @author Mary Brady
  3040. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3041. */
  3042. HTMLElement105: function(test) {
  3043. var success;
  3044. var nodeList;
  3045. var testNode;
  3046. var vdir;
  3047. var doc;
  3048. var docRef = null;
  3049. if (typeof(this.doc) != 'undefined') {
  3050. docRef = this.doc;
  3051. }
  3052. doc = load("element");
  3053. nodeList = doc.getElementsByTagName("samp");
  3054. test.equal(nodeList.length, 1, 'Asize');
  3055. testNode = nodeList.item(0);
  3056. vdir = testNode.dir;
  3057. test.equal(vdir, "ltr", "dirLink");
  3058. test.done();
  3059. },
  3060. /**
  3061. *
  3062. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3063. Retrieve the dir attribute of the KBD element and examine its value.
  3064. * @author NIST
  3065. * @author Mary Brady
  3066. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3067. */
  3068. HTMLElement106: function(test) {
  3069. var success;
  3070. var nodeList;
  3071. var testNode;
  3072. var vdir;
  3073. var doc;
  3074. var docRef = null;
  3075. if (typeof(this.doc) != 'undefined') {
  3076. docRef = this.doc;
  3077. }
  3078. doc = load("element");
  3079. nodeList = doc.getElementsByTagName("kbd");
  3080. test.equal(nodeList.length, 1, 'Asize');
  3081. testNode = nodeList.item(0);
  3082. vdir = testNode.dir;
  3083. test.equal(vdir, "ltr", "dirLink");
  3084. test.done();
  3085. },
  3086. /**
  3087. *
  3088. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3089. Retrieve the dir attribute of the VAR element and examine its value.
  3090. * @author NIST
  3091. * @author Mary Brady
  3092. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3093. */
  3094. HTMLElement107: function(test) {
  3095. var success;
  3096. var nodeList;
  3097. var testNode;
  3098. var vdir;
  3099. var doc;
  3100. var docRef = null;
  3101. if (typeof(this.doc) != 'undefined') {
  3102. docRef = this.doc;
  3103. }
  3104. doc = load("element");
  3105. nodeList = doc.getElementsByTagName("var");
  3106. test.equal(nodeList.length, 1, 'Asize');
  3107. testNode = nodeList.item(0);
  3108. vdir = testNode.dir;
  3109. test.equal(vdir, "ltr", "dirLink");
  3110. test.done();
  3111. },
  3112. /**
  3113. *
  3114. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3115. Retrieve the dir attribute of the CITE element and examine its value.
  3116. * @author NIST
  3117. * @author Mary Brady
  3118. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3119. */
  3120. HTMLElement108: function(test) {
  3121. var success;
  3122. var nodeList;
  3123. var testNode;
  3124. var vdir;
  3125. var doc;
  3126. var docRef = null;
  3127. if (typeof(this.doc) != 'undefined') {
  3128. docRef = this.doc;
  3129. }
  3130. doc = load("element");
  3131. nodeList = doc.getElementsByTagName("cite");
  3132. test.equal(nodeList.length, 1, 'Asize');
  3133. testNode = nodeList.item(0);
  3134. vdir = testNode.dir;
  3135. test.equal(vdir, "ltr", "dirLink");
  3136. test.done();
  3137. },
  3138. /**
  3139. *
  3140. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3141. Retrieve the dir attribute of the ACRONYM element and examine its value.
  3142. * @author NIST
  3143. * @author Mary Brady
  3144. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3145. */
  3146. HTMLElement109: function(test) {
  3147. var success;
  3148. var nodeList;
  3149. var testNode;
  3150. var vdir;
  3151. var doc;
  3152. var docRef = null;
  3153. if (typeof(this.doc) != 'undefined') {
  3154. docRef = this.doc;
  3155. }
  3156. doc = load("element");
  3157. nodeList = doc.getElementsByTagName("acronym");
  3158. test.equal(nodeList.length, 1, 'Asize');
  3159. testNode = nodeList.item(0);
  3160. vdir = testNode.dir;
  3161. test.equal(vdir, "ltr", "dirLink");
  3162. test.done();
  3163. },
  3164. /**
  3165. *
  3166. The id specifies the elements identifier.
  3167. Retrieve the id attribute of the STRIKE element and examine its value.
  3168. * @author NIST
  3169. * @author Mary Brady
  3170. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  3171. */
  3172. HTMLElement11: function(test) {
  3173. var success;
  3174. var nodeList;
  3175. var testNode;
  3176. var vid;
  3177. var doc;
  3178. var docRef = null;
  3179. if (typeof(this.doc) != 'undefined') {
  3180. docRef = this.doc;
  3181. }
  3182. doc = load("element");
  3183. nodeList = doc.getElementsByTagName("strike");
  3184. test.equal(nodeList.length, 1, 'Asize');
  3185. testNode = nodeList.item(0);
  3186. vid = testNode.id;
  3187. test.equal(vid, "Test-STRIKE", "idLink");
  3188. test.done();
  3189. },
  3190. /**
  3191. *
  3192. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3193. Retrieve the dir attribute of the ABBR element and examine its value.
  3194. * @author NIST
  3195. * @author Mary Brady
  3196. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3197. */
  3198. HTMLElement110: function(test) {
  3199. var success;
  3200. var nodeList;
  3201. var testNode;
  3202. var vdir;
  3203. var doc;
  3204. var docRef = null;
  3205. if (typeof(this.doc) != 'undefined') {
  3206. docRef = this.doc;
  3207. }
  3208. doc = load("element");
  3209. nodeList = doc.getElementsByTagName("abbr");
  3210. test.equal(nodeList.length, 1, 'Asize');
  3211. testNode = nodeList.item(0);
  3212. vdir = testNode.dir;
  3213. test.equal(vdir, "ltr", "dirLink");
  3214. test.done();
  3215. },
  3216. /**
  3217. *
  3218. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3219. Retrieve the dir attribute of the DD element and examine its value.
  3220. * @author NIST
  3221. * @author Mary Brady
  3222. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3223. */
  3224. HTMLElement111: function(test) {
  3225. var success;
  3226. var nodeList;
  3227. var testNode;
  3228. var vdir;
  3229. var doc;
  3230. var docRef = null;
  3231. if (typeof(this.doc) != 'undefined') {
  3232. docRef = this.doc;
  3233. }
  3234. doc = load("element");
  3235. nodeList = doc.getElementsByTagName("dd");
  3236. test.equal(nodeList.length, 4, 'Asize');
  3237. testNode = nodeList.item(0);
  3238. vdir = testNode.dir;
  3239. test.equal(vdir, "ltr", "dirLink");
  3240. test.done();
  3241. },
  3242. /**
  3243. *
  3244. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3245. Retrieve the dir attribute of the DT element and examine its value.
  3246. * @author NIST
  3247. * @author Mary Brady
  3248. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3249. */
  3250. HTMLElement112: function(test) {
  3251. var success;
  3252. var nodeList;
  3253. var testNode;
  3254. var vdir;
  3255. var doc;
  3256. var docRef = null;
  3257. if (typeof(this.doc) != 'undefined') {
  3258. docRef = this.doc;
  3259. }
  3260. doc = load("element");
  3261. nodeList = doc.getElementsByTagName("dt");
  3262. test.equal(nodeList.length, 1, 'Asize');
  3263. testNode = nodeList.item(0);
  3264. vdir = testNode.dir;
  3265. test.equal(vdir, "ltr", "dirLink");
  3266. test.done();
  3267. },
  3268. /**
  3269. *
  3270. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3271. Retrieve the dir attribute of the NOFRAMES element and examine its value.
  3272. * @author NIST
  3273. * @author Mary Brady
  3274. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3275. */
  3276. HTMLElement113: function(test) {
  3277. var success;
  3278. var nodeList;
  3279. var testNode;
  3280. var vdir;
  3281. var doc;
  3282. var docRef = null;
  3283. if (typeof(this.doc) != 'undefined') {
  3284. docRef = this.doc;
  3285. }
  3286. doc = load("element");
  3287. nodeList = doc.getElementsByTagName("noframes");
  3288. test.equal(nodeList.length, 1, 'Asize');
  3289. testNode = nodeList.item(0);
  3290. vdir = testNode.dir;
  3291. test.equal(vdir, "ltr", "dirLink");
  3292. test.done();
  3293. },
  3294. /**
  3295. *
  3296. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3297. Retrieve the dir attribute of the NOSCRIPT element and examine its value.
  3298. * @author NIST
  3299. * @author Mary Brady
  3300. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3301. */
  3302. HTMLElement114: function(test) {
  3303. var success;
  3304. var nodeList;
  3305. var testNode;
  3306. var vdir;
  3307. var doc;
  3308. var docRef = null;
  3309. if (typeof(this.doc) != 'undefined') {
  3310. docRef = this.doc;
  3311. }
  3312. doc = load("element");
  3313. nodeList = doc.getElementsByTagName("noscript");
  3314. test.equal(nodeList.length, 1, 'Asize');
  3315. testNode = nodeList.item(0);
  3316. vdir = testNode.dir;
  3317. test.equal(vdir, "ltr", "dirLink");
  3318. test.done();
  3319. },
  3320. /**
  3321. *
  3322. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3323. Retrieve the dir attribute of the ADDRESS element and examine its value.
  3324. * @author NIST
  3325. * @author Mary Brady
  3326. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3327. */
  3328. HTMLElement115: function(test) {
  3329. var success;
  3330. var nodeList;
  3331. var testNode;
  3332. var vdir;
  3333. var doc;
  3334. var docRef = null;
  3335. if (typeof(this.doc) != 'undefined') {
  3336. docRef = this.doc;
  3337. }
  3338. doc = load("element");
  3339. nodeList = doc.getElementsByTagName("address");
  3340. test.equal(nodeList.length, 1, 'Asize');
  3341. testNode = nodeList.item(0);
  3342. vdir = testNode.dir;
  3343. test.equal(vdir, "ltr", "dirLink");
  3344. test.done();
  3345. },
  3346. /**
  3347. *
  3348. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  3349. Retrieve the dir attribute of the CENTER element and examine its value.
  3350. * @author NIST
  3351. * @author Mary Brady
  3352. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  3353. */
  3354. HTMLElement116: function(test) {
  3355. var success;
  3356. var nodeList;
  3357. var testNode;
  3358. var vdir;
  3359. var doc;
  3360. var docRef = null;
  3361. if (typeof(this.doc) != 'undefined') {
  3362. docRef = this.doc;
  3363. }
  3364. doc = load("element");
  3365. nodeList = doc.getElementsByTagName("center");
  3366. test.equal(nodeList.length, 2, 'Asize');
  3367. testNode = nodeList.item(0);
  3368. vdir = testNode.dir;
  3369. test.equal(vdir, "ltr", "dirLink");
  3370. test.done();
  3371. },
  3372. /**
  3373. *
  3374. The className attribute specifies the class attribute of the element.
  3375. Retrieve the class attribute of the HEAD element and examine its value.
  3376. * @author NIST
  3377. * @author Mary Brady
  3378. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3379. */
  3380. HTMLElement117: function(test) {
  3381. var success;
  3382. var nodeList;
  3383. var testNode;
  3384. var vclassname;
  3385. var doc;
  3386. var docRef = null;
  3387. if (typeof(this.doc) != 'undefined') {
  3388. docRef = this.doc;
  3389. }
  3390. doc = load("element");
  3391. nodeList = doc.getElementsByTagName("head");
  3392. test.equal(nodeList.length, 1, 'Asize');
  3393. testNode = nodeList.item(0);
  3394. vclassname = testNode.className;
  3395. test.equal(vclassname, "HEAD-class", "classNameLink");
  3396. test.done();
  3397. },
  3398. /**
  3399. *
  3400. The className attribute specifies the class attribute of the element.
  3401. Retrieve the class attribute of the SUB element and examine its value.
  3402. * @author NIST
  3403. * @author Mary Brady
  3404. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3405. */
  3406. HTMLElement118: function(test) {
  3407. var success;
  3408. var nodeList;
  3409. var testNode;
  3410. var vclassname;
  3411. var doc;
  3412. var docRef = null;
  3413. if (typeof(this.doc) != 'undefined') {
  3414. docRef = this.doc;
  3415. }
  3416. doc = load("element");
  3417. nodeList = doc.getElementsByTagName("sub");
  3418. test.equal(nodeList.length, 1, 'Asize');
  3419. testNode = nodeList.item(0);
  3420. vclassname = testNode.className;
  3421. test.equal(vclassname, "SUB-class", "classNameLink");
  3422. test.done();
  3423. },
  3424. /**
  3425. *
  3426. The className attribute specifies the class attribute of the element.
  3427. Retrieve the class attribute of the SUP element and examine its value.
  3428. * @author NIST
  3429. * @author Mary Brady
  3430. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3431. */
  3432. HTMLElement119: function(test) {
  3433. var success;
  3434. var nodeList;
  3435. var testNode;
  3436. var vclassname;
  3437. var doc;
  3438. var docRef = null;
  3439. if (typeof(this.doc) != 'undefined') {
  3440. docRef = this.doc;
  3441. }
  3442. doc = load("element");
  3443. nodeList = doc.getElementsByTagName("sup");
  3444. test.equal(nodeList.length, 1, 'Asize');
  3445. testNode = nodeList.item(0);
  3446. vclassname = testNode.className;
  3447. test.equal(vclassname, "SUP-class", "classNameLink");
  3448. test.done();
  3449. },
  3450. /**
  3451. *
  3452. The id specifies the elements identifier.
  3453. Retrieve the id attribute of the BIG element and examine its value.
  3454. * @author NIST
  3455. * @author Mary Brady
  3456. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  3457. */
  3458. HTMLElement12: function(test) {
  3459. var success;
  3460. var nodeList;
  3461. var testNode;
  3462. var vid;
  3463. var doc;
  3464. var docRef = null;
  3465. if (typeof(this.doc) != 'undefined') {
  3466. docRef = this.doc;
  3467. }
  3468. doc = load("element");
  3469. nodeList = doc.getElementsByTagName("big");
  3470. test.equal(nodeList.length, 1, 'Asize');
  3471. testNode = nodeList.item(0);
  3472. vid = testNode.id;
  3473. test.equal(vid, "Test-BIG", "idLink");
  3474. test.done();
  3475. },
  3476. /**
  3477. *
  3478. The className attribute specifies the class attribute of the element.
  3479. Retrieve the class attribute of the SPAN element and examine its value.
  3480. * @author NIST
  3481. * @author Mary Brady
  3482. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3483. */
  3484. HTMLElement120: function(test) {
  3485. var success;
  3486. var nodeList;
  3487. var testNode;
  3488. var vclassname;
  3489. var doc;
  3490. var docRef = null;
  3491. if (typeof(this.doc) != 'undefined') {
  3492. docRef = this.doc;
  3493. }
  3494. doc = load("element");
  3495. nodeList = doc.getElementsByTagName("span");
  3496. test.equal(nodeList.length, 1, 'Asize');
  3497. testNode = nodeList.item(0);
  3498. vclassname = testNode.className;
  3499. test.equal(vclassname, "SPAN-class", "classNameLink");
  3500. test.done();
  3501. },
  3502. /**
  3503. *
  3504. The className attribute specifies the class attribute of the element.
  3505. Retrieve the class attribute of the BDO element and examine its value.
  3506. * @author NIST
  3507. * @author Mary Brady
  3508. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3509. */
  3510. HTMLElement121: function(test) {
  3511. var success;
  3512. var nodeList;
  3513. var testNode;
  3514. var vclassname;
  3515. var doc;
  3516. var docRef = null;
  3517. if (typeof(this.doc) != 'undefined') {
  3518. docRef = this.doc;
  3519. }
  3520. doc = load("element");
  3521. nodeList = doc.getElementsByTagName("bdo");
  3522. test.equal(nodeList.length, 1, 'Asize');
  3523. testNode = nodeList.item(0);
  3524. vclassname = testNode.className;
  3525. test.equal(vclassname, "BDO-class", "classNameLink");
  3526. test.done();
  3527. },
  3528. /**
  3529. *
  3530. The className attribute specifies the class attribute of the element.
  3531. Retrieve the class attribute of the TT element and examine its value.
  3532. * @author NIST
  3533. * @author Mary Brady
  3534. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3535. */
  3536. HTMLElement122: function(test) {
  3537. var success;
  3538. var nodeList;
  3539. var testNode;
  3540. var vclassname;
  3541. var doc;
  3542. var docRef = null;
  3543. if (typeof(this.doc) != 'undefined') {
  3544. docRef = this.doc;
  3545. }
  3546. doc = load("element");
  3547. nodeList = doc.getElementsByTagName("tt");
  3548. test.equal(nodeList.length, 1, 'Asize');
  3549. testNode = nodeList.item(0);
  3550. vclassname = testNode.className;
  3551. test.equal(vclassname, "TT-class", "classNameLink");
  3552. test.done();
  3553. },
  3554. /**
  3555. *
  3556. The className attribute specifies the class attribute of the element.
  3557. Retrieve the class attribute of the I element and examine its value.
  3558. * @author NIST
  3559. * @author Mary Brady
  3560. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3561. */
  3562. HTMLElement123: function(test) {
  3563. var success;
  3564. var nodeList;
  3565. var testNode;
  3566. var vclassname;
  3567. var doc;
  3568. var docRef = null;
  3569. if (typeof(this.doc) != 'undefined') {
  3570. docRef = this.doc;
  3571. }
  3572. doc = load("element");
  3573. nodeList = doc.getElementsByTagName("i");
  3574. test.equal(nodeList.length, 1, 'Asize');
  3575. testNode = nodeList.item(0);
  3576. vclassname = testNode.className;
  3577. test.equal(vclassname, "I-class", "classNameLink");
  3578. test.done();
  3579. },
  3580. /**
  3581. *
  3582. The className attribute specifies the class attribute of the element.
  3583. Retrieve the class attribute of the B element and examine its value.
  3584. * @author NIST
  3585. * @author Mary Brady
  3586. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3587. */
  3588. HTMLElement124: function(test) {
  3589. var success;
  3590. var nodeList;
  3591. var testNode;
  3592. var vclassname;
  3593. var doc;
  3594. var docRef = null;
  3595. if (typeof(this.doc) != 'undefined') {
  3596. docRef = this.doc;
  3597. }
  3598. doc = load("element");
  3599. nodeList = doc.getElementsByTagName("b");
  3600. test.equal(nodeList.length, 1, 'Asize');
  3601. testNode = nodeList.item(0);
  3602. vclassname = testNode.className;
  3603. test.equal(vclassname, "B-class", "classNameLink");
  3604. test.done();
  3605. },
  3606. /**
  3607. *
  3608. The className attribute specifies the class attribute of the element.
  3609. Retrieve the class attribute of the U element and examine its value.
  3610. * @author NIST
  3611. * @author Mary Brady
  3612. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3613. */
  3614. HTMLElement125: function(test) {
  3615. var success;
  3616. var nodeList;
  3617. var testNode;
  3618. var vclassname;
  3619. var doc;
  3620. var docRef = null;
  3621. if (typeof(this.doc) != 'undefined') {
  3622. docRef = this.doc;
  3623. }
  3624. doc = load("element");
  3625. nodeList = doc.getElementsByTagName("u");
  3626. test.equal(nodeList.length, 1, 'Asize');
  3627. testNode = nodeList.item(0);
  3628. vclassname = testNode.className;
  3629. test.equal(vclassname, "U-class", "classNameLink");
  3630. test.done();
  3631. },
  3632. /**
  3633. *
  3634. The className attribute specifies the class attribute of the element.
  3635. Retrieve the class attribute of the S element and examine its value.
  3636. * @author NIST
  3637. * @author Mary Brady
  3638. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3639. */
  3640. HTMLElement126: function(test) {
  3641. var success;
  3642. var nodeList;
  3643. var testNode;
  3644. var vclassname;
  3645. var doc;
  3646. var docRef = null;
  3647. if (typeof(this.doc) != 'undefined') {
  3648. docRef = this.doc;
  3649. }
  3650. doc = load("element");
  3651. nodeList = doc.getElementsByTagName("s");
  3652. test.equal(nodeList.length, 1, 'Asize');
  3653. testNode = nodeList.item(0);
  3654. vclassname = testNode.className;
  3655. test.equal(vclassname, "S-class", "classNameLink");
  3656. test.done();
  3657. },
  3658. /**
  3659. *
  3660. The className attribute specifies the class attribute of the element.
  3661. Retrieve the class attribute of the STRIKE element and examine its value.
  3662. * @author NIST
  3663. * @author Mary Brady
  3664. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3665. */
  3666. HTMLElement127: function(test) {
  3667. var success;
  3668. var nodeList;
  3669. var testNode;
  3670. var vclassname;
  3671. var doc;
  3672. var docRef = null;
  3673. if (typeof(this.doc) != 'undefined') {
  3674. docRef = this.doc;
  3675. }
  3676. doc = load("element");
  3677. nodeList = doc.getElementsByTagName("strike");
  3678. test.equal(nodeList.length, 1, 'Asize');
  3679. testNode = nodeList.item(0);
  3680. vclassname = testNode.className;
  3681. test.equal(vclassname, "STRIKE-class", "classNameLink");
  3682. test.done();
  3683. },
  3684. /**
  3685. *
  3686. The className attribute specifies the class attribute of the element.
  3687. Retrieve the class attribute of the BIG element and examine its value.
  3688. * @author NIST
  3689. * @author Mary Brady
  3690. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3691. */
  3692. HTMLElement128: function(test) {
  3693. var success;
  3694. var nodeList;
  3695. var testNode;
  3696. var vclassname;
  3697. var doc;
  3698. var docRef = null;
  3699. if (typeof(this.doc) != 'undefined') {
  3700. docRef = this.doc;
  3701. }
  3702. doc = load("element");
  3703. nodeList = doc.getElementsByTagName("big");
  3704. test.equal(nodeList.length, 1, 'Asize');
  3705. testNode = nodeList.item(0);
  3706. vclassname = testNode.className;
  3707. test.equal(vclassname, "BIG-class", "classNameLink");
  3708. test.done();
  3709. },
  3710. /**
  3711. *
  3712. The className attribute specifies the class attribute of the element.
  3713. Retrieve the class attribute of the SMALL element and examine its value.
  3714. * @author NIST
  3715. * @author Mary Brady
  3716. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3717. */
  3718. HTMLElement129: function(test) {
  3719. var success;
  3720. var nodeList;
  3721. var testNode;
  3722. var vclassname;
  3723. var doc;
  3724. var docRef = null;
  3725. if (typeof(this.doc) != 'undefined') {
  3726. docRef = this.doc;
  3727. }
  3728. doc = load("element");
  3729. nodeList = doc.getElementsByTagName("small");
  3730. test.equal(nodeList.length, 1, 'Asize');
  3731. testNode = nodeList.item(0);
  3732. vclassname = testNode.className;
  3733. test.equal(vclassname, "SMALL-class", "classNameLink");
  3734. test.done();
  3735. },
  3736. /**
  3737. *
  3738. The id specifies the elements identifier.
  3739. Retrieve the id attribute of the SMALL element and examine its value.
  3740. * @author NIST
  3741. * @author Mary Brady
  3742. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  3743. */
  3744. HTMLElement13: function(test) {
  3745. var success;
  3746. var nodeList;
  3747. var testNode;
  3748. var vid;
  3749. var doc;
  3750. var docRef = null;
  3751. if (typeof(this.doc) != 'undefined') {
  3752. docRef = this.doc;
  3753. }
  3754. doc = load("element");
  3755. nodeList = doc.getElementsByTagName("small");
  3756. test.equal(nodeList.length, 1, 'Asize');
  3757. testNode = nodeList.item(0);
  3758. vid = testNode.id;
  3759. test.equal(vid, "Test-SMALL", "idLink");
  3760. test.done();
  3761. },
  3762. /**
  3763. *
  3764. The className attribute specifies the class attribute of the element.
  3765. Retrieve the class attribute of the EM element and examine its value.
  3766. * @author NIST
  3767. * @author Mary Brady
  3768. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3769. */
  3770. HTMLElement130: function(test) {
  3771. var success;
  3772. var nodeList;
  3773. var testNode;
  3774. var vclassname;
  3775. var doc;
  3776. var docRef = null;
  3777. if (typeof(this.doc) != 'undefined') {
  3778. docRef = this.doc;
  3779. }
  3780. doc = load("element");
  3781. nodeList = doc.getElementsByTagName("em");
  3782. test.equal(nodeList.length, 1, 'Asize');
  3783. testNode = nodeList.item(0);
  3784. vclassname = testNode.className;
  3785. test.equal(vclassname, "EM-class", "classNameLink");
  3786. test.done();
  3787. },
  3788. /**
  3789. *
  3790. The className attribute specifies the class attribute of the element.
  3791. Retrieve the class attribute of the STRONG element and examine its value.
  3792. * @author NIST
  3793. * @author Mary Brady
  3794. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3795. */
  3796. HTMLElement131: function(test) {
  3797. var success;
  3798. var nodeList;
  3799. var testNode;
  3800. var vclassname;
  3801. var doc;
  3802. var docRef = null;
  3803. if (typeof(this.doc) != 'undefined') {
  3804. docRef = this.doc;
  3805. }
  3806. doc = load("element");
  3807. nodeList = doc.getElementsByTagName("strong");
  3808. test.equal(nodeList.length, 1, 'Asize');
  3809. testNode = nodeList.item(0);
  3810. vclassname = testNode.className;
  3811. test.equal(vclassname, "STRONG-class", "classNameLink");
  3812. test.done();
  3813. },
  3814. /**
  3815. *
  3816. The className attribute specifies the class attribute of the element.
  3817. Retrieve the class attribute of the DFN element and examine its value.
  3818. * @author NIST
  3819. * @author Mary Brady
  3820. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3821. */
  3822. HTMLElement132: function(test) {
  3823. var success;
  3824. var nodeList;
  3825. var testNode;
  3826. var vclassname;
  3827. var doc;
  3828. var docRef = null;
  3829. if (typeof(this.doc) != 'undefined') {
  3830. docRef = this.doc;
  3831. }
  3832. doc = load("element");
  3833. nodeList = doc.getElementsByTagName("dfn");
  3834. test.equal(nodeList.length, 1, 'Asize');
  3835. testNode = nodeList.item(0);
  3836. vclassname = testNode.className;
  3837. test.equal(vclassname, "DFN-class", "classNameLink");
  3838. test.done();
  3839. },
  3840. /**
  3841. *
  3842. The className attribute specifies the class attribute of the element.
  3843. Retrieve the class attribute of the CODE element and examine its value.
  3844. * @author NIST
  3845. * @author Mary Brady
  3846. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3847. */
  3848. HTMLElement133: function(test) {
  3849. var success;
  3850. var nodeList;
  3851. var testNode;
  3852. var vclassname;
  3853. var doc;
  3854. var docRef = null;
  3855. if (typeof(this.doc) != 'undefined') {
  3856. docRef = this.doc;
  3857. }
  3858. doc = load("element");
  3859. nodeList = doc.getElementsByTagName("code");
  3860. test.equal(nodeList.length, 1, 'Asize');
  3861. testNode = nodeList.item(0);
  3862. vclassname = testNode.className;
  3863. test.equal(vclassname, "CODE-class", "classNameLink");
  3864. test.done();
  3865. },
  3866. /**
  3867. *
  3868. The className attribute specifies the class attribute of the element.
  3869. Retrieve the class attribute of the SAMP element and examine its value.
  3870. * @author NIST
  3871. * @author Mary Brady
  3872. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3873. */
  3874. HTMLElement134: function(test) {
  3875. var success;
  3876. var nodeList;
  3877. var testNode;
  3878. var vclassname;
  3879. var doc;
  3880. var docRef = null;
  3881. if (typeof(this.doc) != 'undefined') {
  3882. docRef = this.doc;
  3883. }
  3884. doc = load("element");
  3885. nodeList = doc.getElementsByTagName("samp");
  3886. test.equal(nodeList.length, 1, 'Asize');
  3887. testNode = nodeList.item(0);
  3888. vclassname = testNode.className;
  3889. test.equal(vclassname, "SAMP-class", "classNameLink");
  3890. test.done();
  3891. },
  3892. /**
  3893. *
  3894. The className attribute specifies the class attribute of the element.
  3895. Retrieve the class attribute of the KBD element and examine its value.
  3896. * @author NIST
  3897. * @author Mary Brady
  3898. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3899. */
  3900. HTMLElement135: function(test) {
  3901. var success;
  3902. var nodeList;
  3903. var testNode;
  3904. var vclassname;
  3905. var doc;
  3906. var docRef = null;
  3907. if (typeof(this.doc) != 'undefined') {
  3908. docRef = this.doc;
  3909. }
  3910. doc = load("element");
  3911. nodeList = doc.getElementsByTagName("kbd");
  3912. test.equal(nodeList.length, 1, 'Asize');
  3913. testNode = nodeList.item(0);
  3914. vclassname = testNode.className;
  3915. test.equal(vclassname, "KBD-class", "classNameLink");
  3916. test.done();
  3917. },
  3918. /**
  3919. *
  3920. The className attribute specifies the class attribute of the element.
  3921. Retrieve the class attribute of the VAR element and examine its value.
  3922. * @author NIST
  3923. * @author Mary Brady
  3924. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3925. */
  3926. HTMLElement136: function(test) {
  3927. var success;
  3928. var nodeList;
  3929. var testNode;
  3930. var vclassname;
  3931. var doc;
  3932. var docRef = null;
  3933. if (typeof(this.doc) != 'undefined') {
  3934. docRef = this.doc;
  3935. }
  3936. doc = load("element");
  3937. nodeList = doc.getElementsByTagName("var");
  3938. test.equal(nodeList.length, 1, 'Asize');
  3939. testNode = nodeList.item(0);
  3940. vclassname = testNode.className;
  3941. test.equal(vclassname, "VAR-class", "classNameLink");
  3942. test.done();
  3943. },
  3944. /**
  3945. *
  3946. The className attribute specifies the class attribute of the element.
  3947. Retrieve the class attribute of the CITE element and examine its value.
  3948. * @author NIST
  3949. * @author Mary Brady
  3950. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3951. */
  3952. HTMLElement137: function(test) {
  3953. var success;
  3954. var nodeList;
  3955. var testNode;
  3956. var vclassname;
  3957. var doc;
  3958. var docRef = null;
  3959. if (typeof(this.doc) != 'undefined') {
  3960. docRef = this.doc;
  3961. }
  3962. doc = load("element");
  3963. nodeList = doc.getElementsByTagName("cite");
  3964. test.equal(nodeList.length, 1, 'Asize');
  3965. testNode = nodeList.item(0);
  3966. vclassname = testNode.className;
  3967. test.equal(vclassname, "CITE-class", "classNameLink");
  3968. test.done();
  3969. },
  3970. /**
  3971. *
  3972. The className attribute specifies the class attribute of the element.
  3973. Retrieve the class attribute of the ACRONYM element and examine its value.
  3974. * @author NIST
  3975. * @author Mary Brady
  3976. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  3977. */
  3978. HTMLElement138: function(test) {
  3979. var success;
  3980. var nodeList;
  3981. var testNode;
  3982. var vclassname;
  3983. var doc;
  3984. var docRef = null;
  3985. if (typeof(this.doc) != 'undefined') {
  3986. docRef = this.doc;
  3987. }
  3988. doc = load("element");
  3989. nodeList = doc.getElementsByTagName("acronym");
  3990. test.equal(nodeList.length, 1, 'Asize');
  3991. testNode = nodeList.item(0);
  3992. vclassname = testNode.className;
  3993. test.equal(vclassname, "ACRONYM-class", "classNameLink");
  3994. test.done();
  3995. },
  3996. /**
  3997. *
  3998. The className attribute specifies the class attribute of the element.
  3999. Retrieve the class attribute of the ABBR element and examine its value.
  4000. * @author NIST
  4001. * @author Mary Brady
  4002. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  4003. */
  4004. HTMLElement139: function(test) {
  4005. var success;
  4006. var nodeList;
  4007. var testNode;
  4008. var vclassname;
  4009. var doc;
  4010. var docRef = null;
  4011. if (typeof(this.doc) != 'undefined') {
  4012. docRef = this.doc;
  4013. }
  4014. doc = load("element");
  4015. nodeList = doc.getElementsByTagName("abbr");
  4016. test.equal(nodeList.length, 1, 'Asize');
  4017. testNode = nodeList.item(0);
  4018. vclassname = testNode.className;
  4019. test.equal(vclassname, "ABBR-class", "classNameLink");
  4020. test.done();
  4021. },
  4022. /**
  4023. *
  4024. The id specifies the elements identifier.
  4025. Retrieve the id attribute of the EM element and examine its value.
  4026. * @author NIST
  4027. * @author Mary Brady
  4028. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4029. */
  4030. HTMLElement14: function(test) {
  4031. var success;
  4032. var nodeList;
  4033. var testNode;
  4034. var vid;
  4035. var doc;
  4036. var docRef = null;
  4037. if (typeof(this.doc) != 'undefined') {
  4038. docRef = this.doc;
  4039. }
  4040. doc = load("element");
  4041. nodeList = doc.getElementsByTagName("em");
  4042. test.equal(nodeList.length, 1, 'Asize');
  4043. testNode = nodeList.item(0);
  4044. vid = testNode.id;
  4045. test.equal(vid, "Test-EM", "idLink");
  4046. test.done();
  4047. },
  4048. /**
  4049. *
  4050. The className attribute specifies the class attribute of the element.
  4051. Retrieve the class attribute of the DD element and examine its value.
  4052. * @author NIST
  4053. * @author Mary Brady
  4054. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  4055. */
  4056. HTMLElement140: function(test) {
  4057. var success;
  4058. var nodeList;
  4059. var testNode;
  4060. var vclassname;
  4061. var doc;
  4062. var docRef = null;
  4063. if (typeof(this.doc) != 'undefined') {
  4064. docRef = this.doc;
  4065. }
  4066. doc = load("element");
  4067. nodeList = doc.getElementsByTagName("dd");
  4068. test.equal(nodeList.length, 4, 'Asize');
  4069. testNode = nodeList.item(0);
  4070. vclassname = testNode.className;
  4071. test.equal(vclassname, "DD-class", "classNameLink");
  4072. test.done();
  4073. },
  4074. /**
  4075. *
  4076. The className attribute specifies the class attribute of the element.
  4077. Retrieve the class attribute of the DT element and examine its value.
  4078. * @author NIST
  4079. * @author Mary Brady
  4080. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  4081. */
  4082. HTMLElement141: function(test) {
  4083. var success;
  4084. var nodeList;
  4085. var testNode;
  4086. var vclassname;
  4087. var doc;
  4088. var docRef = null;
  4089. if (typeof(this.doc) != 'undefined') {
  4090. docRef = this.doc;
  4091. }
  4092. doc = load("element");
  4093. nodeList = doc.getElementsByTagName("dt");
  4094. test.equal(nodeList.length, 1, 'Asize');
  4095. testNode = nodeList.item(0);
  4096. vclassname = testNode.className;
  4097. test.equal(vclassname, "DT-class", "classNameLink");
  4098. test.done();
  4099. },
  4100. /**
  4101. *
  4102. The className attribute specifies the class attribute of the element.
  4103. Retrieve the class attribute of the NOFRAMES element and examine its value.
  4104. * @author NIST
  4105. * @author Mary Brady
  4106. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  4107. */
  4108. HTMLElement142: function(test) {
  4109. var success;
  4110. var nodeList;
  4111. var testNode;
  4112. var vclassname;
  4113. var doc;
  4114. var docRef = null;
  4115. if (typeof(this.doc) != 'undefined') {
  4116. docRef = this.doc;
  4117. }
  4118. doc = load("element");
  4119. nodeList = doc.getElementsByTagName("noframes");
  4120. test.equal(nodeList.length, 1, 'Asize');
  4121. testNode = nodeList.item(0);
  4122. vclassname = testNode.className;
  4123. test.equal(vclassname, "NOFRAMES-class", "classNameLink");
  4124. test.done();
  4125. },
  4126. /**
  4127. *
  4128. The className attribute specifies the class attribute of the element.
  4129. Retrieve the class attribute of the NOSCRIPT element and examine its value.
  4130. * @author NIST
  4131. * @author Mary Brady
  4132. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  4133. */
  4134. HTMLElement143: function(test) {
  4135. var success;
  4136. var nodeList;
  4137. var testNode;
  4138. var vclassname;
  4139. var doc;
  4140. var docRef = null;
  4141. if (typeof(this.doc) != 'undefined') {
  4142. docRef = this.doc;
  4143. }
  4144. doc = load("element");
  4145. nodeList = doc.getElementsByTagName("noscript");
  4146. test.equal(nodeList.length, 1, 'Asize');
  4147. testNode = nodeList.item(0);
  4148. vclassname = testNode.className;
  4149. test.equal(vclassname, "NOSCRIPT-class", "classNameLink");
  4150. test.done();
  4151. },
  4152. /**
  4153. *
  4154. The className attribute specifies the class attribute of the element.
  4155. Retrieve the class attribute of the ADDRESS element and examine its value.
  4156. * @author NIST
  4157. * @author Mary Brady
  4158. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  4159. */
  4160. HTMLElement144: function(test) {
  4161. var success;
  4162. var nodeList;
  4163. var testNode;
  4164. var vclassname;
  4165. var doc;
  4166. var docRef = null;
  4167. if (typeof(this.doc) != 'undefined') {
  4168. docRef = this.doc;
  4169. }
  4170. doc = load("element");
  4171. nodeList = doc.getElementsByTagName("address");
  4172. test.equal(nodeList.length, 1, 'Asize');
  4173. testNode = nodeList.item(0);
  4174. vclassname = testNode.className;
  4175. test.equal(vclassname, "ADDRESS-class", "classNameLink");
  4176. test.done();
  4177. },
  4178. /**
  4179. *
  4180. The className attribute specifies the class attribute of the element.
  4181. Retrieve the class attribute of the CENTER element and examine its value.
  4182. * @author NIST
  4183. * @author Mary Brady
  4184. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
  4185. */
  4186. HTMLElement145: function(test) {
  4187. var success;
  4188. var nodeList;
  4189. var testNode;
  4190. var vclassname;
  4191. var doc;
  4192. var docRef = null;
  4193. if (typeof(this.doc) != 'undefined') {
  4194. docRef = this.doc;
  4195. }
  4196. doc = load("element");
  4197. nodeList = doc.getElementsByTagName("center");
  4198. test.equal(nodeList.length, 2, 'Asize');
  4199. testNode = nodeList.item(0);
  4200. vclassname = testNode.className;
  4201. test.equal(vclassname, "CENTER-class", "classNameLink");
  4202. test.done();
  4203. },
  4204. /**
  4205. *
  4206. The id specifies the elements identifier.
  4207. Retrieve the id attribute of the STRONG element and examine its value.
  4208. * @author NIST
  4209. * @author Mary Brady
  4210. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4211. */
  4212. HTMLElement15: function(test) {
  4213. var success;
  4214. var nodeList;
  4215. var testNode;
  4216. var vid;
  4217. var doc;
  4218. var docRef = null;
  4219. if (typeof(this.doc) != 'undefined') {
  4220. docRef = this.doc;
  4221. }
  4222. doc = load("element");
  4223. nodeList = doc.getElementsByTagName("strong");
  4224. test.equal(nodeList.length, 1, 'Asize');
  4225. testNode = nodeList.item(0);
  4226. vid = testNode.id;
  4227. test.equal(vid, "Test-STRONG", "idLink");
  4228. test.done();
  4229. },
  4230. /**
  4231. *
  4232. The id specifies the elements identifier.
  4233. Retrieve the id attribute of the DFN element and examine its value.
  4234. * @author NIST
  4235. * @author Mary Brady
  4236. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4237. */
  4238. HTMLElement16: function(test) {
  4239. var success;
  4240. var nodeList;
  4241. var testNode;
  4242. var vid;
  4243. var doc;
  4244. var docRef = null;
  4245. if (typeof(this.doc) != 'undefined') {
  4246. docRef = this.doc;
  4247. }
  4248. doc = load("element");
  4249. nodeList = doc.getElementsByTagName("dfn");
  4250. test.equal(nodeList.length, 1, 'Asize');
  4251. testNode = nodeList.item(0);
  4252. vid = testNode.id;
  4253. test.equal(vid, "Test-DFN", "idLink");
  4254. test.done();
  4255. },
  4256. /**
  4257. *
  4258. The id specifies the elements identifier.
  4259. Retrieve the id attribute of the CODE element and examine its value.
  4260. * @author NIST
  4261. * @author Mary Brady
  4262. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4263. */
  4264. HTMLElement17: function(test) {
  4265. var success;
  4266. var nodeList;
  4267. var testNode;
  4268. var vid;
  4269. var doc;
  4270. var docRef = null;
  4271. if (typeof(this.doc) != 'undefined') {
  4272. docRef = this.doc;
  4273. }
  4274. doc = load("element");
  4275. nodeList = doc.getElementsByTagName("code");
  4276. test.equal(nodeList.length, 1, 'Asize');
  4277. testNode = nodeList.item(0);
  4278. vid = testNode.id;
  4279. test.equal(vid, "Test-CODE", "idLink");
  4280. test.done();
  4281. },
  4282. /**
  4283. *
  4284. The id specifies the elements identifier.
  4285. Retrieve the id attribute of the SAMP element and examine its value.
  4286. * @author NIST
  4287. * @author Mary Brady
  4288. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4289. */
  4290. HTMLElement18: function(test) {
  4291. var success;
  4292. var nodeList;
  4293. var testNode;
  4294. var vid;
  4295. var doc;
  4296. var docRef = null;
  4297. if (typeof(this.doc) != 'undefined') {
  4298. docRef = this.doc;
  4299. }
  4300. doc = load("element");
  4301. nodeList = doc.getElementsByTagName("samp");
  4302. test.equal(nodeList.length, 1, 'Asize');
  4303. testNode = nodeList.item(0);
  4304. vid = testNode.id;
  4305. test.equal(vid, "Test-SAMP", "idLink");
  4306. test.done();
  4307. },
  4308. /**
  4309. *
  4310. The id specifies the elements identifier.
  4311. Retrieve the id attribute of the KBD element and examine its value.
  4312. * @author NIST
  4313. * @author Mary Brady
  4314. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4315. */
  4316. HTMLElement19: function(test) {
  4317. var success;
  4318. var nodeList;
  4319. var testNode;
  4320. var vid;
  4321. var doc;
  4322. var docRef = null;
  4323. if (typeof(this.doc) != 'undefined') {
  4324. docRef = this.doc;
  4325. }
  4326. doc = load("element");
  4327. nodeList = doc.getElementsByTagName("kbd");
  4328. test.equal(nodeList.length, 1, 'Asize');
  4329. testNode = nodeList.item(0);
  4330. vid = testNode.id;
  4331. test.equal(vid, "Test-KBD", "idLink");
  4332. test.done();
  4333. },
  4334. /**
  4335. *
  4336. The id specifies the elements identifier.
  4337. Retrieve the id attribute of the VAR element and examine its value.
  4338. * @author NIST
  4339. * @author Mary Brady
  4340. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4341. */
  4342. HTMLElement20: function(test) {
  4343. var success;
  4344. var nodeList;
  4345. var testNode;
  4346. var vid;
  4347. var doc;
  4348. var docRef = null;
  4349. if (typeof(this.doc) != 'undefined') {
  4350. docRef = this.doc;
  4351. }
  4352. doc = load("element");
  4353. nodeList = doc.getElementsByTagName("var");
  4354. test.equal(nodeList.length, 1, 'Asize');
  4355. testNode = nodeList.item(0);
  4356. vid = testNode.id;
  4357. test.equal(vid, "Test-VAR", "idLink");
  4358. test.done();
  4359. },
  4360. /**
  4361. *
  4362. The id specifies the elements identifier.
  4363. Retrieve the id attribute of the CITE element and examine its value.
  4364. * @author NIST
  4365. * @author Mary Brady
  4366. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4367. */
  4368. HTMLElement21: function(test) {
  4369. var success;
  4370. var nodeList;
  4371. var testNode;
  4372. var vid;
  4373. var doc;
  4374. var docRef = null;
  4375. if (typeof(this.doc) != 'undefined') {
  4376. docRef = this.doc;
  4377. }
  4378. doc = load("element");
  4379. nodeList = doc.getElementsByTagName("cite");
  4380. test.equal(nodeList.length, 1, 'Asize');
  4381. testNode = nodeList.item(0);
  4382. vid = testNode.id;
  4383. test.equal(vid, "Test-CITE", "idLink");
  4384. test.done();
  4385. },
  4386. /**
  4387. *
  4388. The id specifies the elements identifier.
  4389. Retrieve the id attribute of the ACRONYM element and examine its value.
  4390. * @author NIST
  4391. * @author Mary Brady
  4392. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4393. */
  4394. HTMLElement22: function(test) {
  4395. var success;
  4396. var nodeList;
  4397. var testNode;
  4398. var vid;
  4399. var doc;
  4400. var docRef = null;
  4401. if (typeof(this.doc) != 'undefined') {
  4402. docRef = this.doc;
  4403. }
  4404. doc = load("element");
  4405. nodeList = doc.getElementsByTagName("acronym");
  4406. test.equal(nodeList.length, 1, 'Asize');
  4407. testNode = nodeList.item(0);
  4408. vid = testNode.id;
  4409. test.equal(vid, "Test-ACRONYM", "idLink");
  4410. test.done();
  4411. },
  4412. /**
  4413. *
  4414. The id specifies the elements identifier.
  4415. Retrieve the id attribute of the ABBR element and examine its value.
  4416. * @author NIST
  4417. * @author Mary Brady
  4418. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4419. */
  4420. HTMLElement23: function(test) {
  4421. var success;
  4422. var nodeList;
  4423. var testNode;
  4424. var vid;
  4425. var doc;
  4426. var docRef = null;
  4427. if (typeof(this.doc) != 'undefined') {
  4428. docRef = this.doc;
  4429. }
  4430. doc = load("element");
  4431. nodeList = doc.getElementsByTagName("abbr");
  4432. test.equal(nodeList.length, 1, 'Asize');
  4433. testNode = nodeList.item(0);
  4434. vid = testNode.id;
  4435. test.equal(vid, "Test-ABBR", "idLink");
  4436. test.done();
  4437. },
  4438. /**
  4439. *
  4440. The id specifies the elements identifier.
  4441. Retrieve the id attribute of the DD element and examine its value.
  4442. * @author NIST
  4443. * @author Mary Brady
  4444. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4445. */
  4446. HTMLElement24: function(test) {
  4447. var success;
  4448. var nodeList;
  4449. var testNode;
  4450. var vid;
  4451. var doc;
  4452. var docRef = null;
  4453. if (typeof(this.doc) != 'undefined') {
  4454. docRef = this.doc;
  4455. }
  4456. doc = load("element");
  4457. nodeList = doc.getElementsByTagName("dd");
  4458. test.equal(nodeList.length, 4, 'Asize');
  4459. testNode = nodeList.item(0);
  4460. vid = testNode.id;
  4461. test.equal(vid, "Test-DD", "idLink");
  4462. test.done();
  4463. },
  4464. /**
  4465. *
  4466. The id specifies the elements identifier.
  4467. Retrieve the id attribute of the DT element and examine its value.
  4468. * @author NIST
  4469. * @author Mary Brady
  4470. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4471. */
  4472. HTMLElement25: function(test) {
  4473. var success;
  4474. var nodeList;
  4475. var testNode;
  4476. var vid;
  4477. var doc;
  4478. var docRef = null;
  4479. if (typeof(this.doc) != 'undefined') {
  4480. docRef = this.doc;
  4481. }
  4482. doc = load("element");
  4483. nodeList = doc.getElementsByTagName("dt");
  4484. test.equal(nodeList.length, 1, 'Asize');
  4485. testNode = nodeList.item(0);
  4486. vid = testNode.id;
  4487. test.equal(vid, "Test-DT", "idLink");
  4488. test.done();
  4489. },
  4490. /**
  4491. *
  4492. The id specifies the elements identifier.
  4493. Retrieve the id attribute of the NOFRAMES element and examine its value.
  4494. * @author NIST
  4495. * @author Mary Brady
  4496. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4497. */
  4498. HTMLElement26: function(test) {
  4499. var success;
  4500. var nodeList;
  4501. var testNode;
  4502. var vid;
  4503. var doc;
  4504. var docRef = null;
  4505. if (typeof(this.doc) != 'undefined') {
  4506. docRef = this.doc;
  4507. }
  4508. doc = load("element");
  4509. nodeList = doc.getElementsByTagName("noframes");
  4510. test.equal(nodeList.length, 1, 'Asize');
  4511. testNode = nodeList.item(0);
  4512. vid = testNode.id;
  4513. test.equal(vid, "Test-NOFRAMES", "idLink");
  4514. test.done();
  4515. },
  4516. /**
  4517. *
  4518. The id specifies the elements identifier.
  4519. Retrieve the id attribute of the NOSCRIPT element and examine its value.
  4520. * @author NIST
  4521. * @author Mary Brady
  4522. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4523. */
  4524. HTMLElement27: function(test) {
  4525. var success;
  4526. var nodeList;
  4527. var testNode;
  4528. var vid;
  4529. var doc;
  4530. var docRef = null;
  4531. if (typeof(this.doc) != 'undefined') {
  4532. docRef = this.doc;
  4533. }
  4534. doc = load("element");
  4535. nodeList = doc.getElementsByTagName("noscript");
  4536. test.equal(nodeList.length, 1, 'Asize');
  4537. testNode = nodeList.item(0);
  4538. vid = testNode.id;
  4539. test.equal(vid, "Test-NOSCRIPT", "idLink");
  4540. test.done();
  4541. },
  4542. /**
  4543. *
  4544. The id specifies the elements identifier.
  4545. Retrieve the id attribute of the ADDRESS element and examine its value.
  4546. * @author NIST
  4547. * @author Mary Brady
  4548. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4549. */
  4550. HTMLElement28: function(test) {
  4551. var success;
  4552. var nodeList;
  4553. var testNode;
  4554. var vid;
  4555. var doc;
  4556. var docRef = null;
  4557. if (typeof(this.doc) != 'undefined') {
  4558. docRef = this.doc;
  4559. }
  4560. doc = load("element");
  4561. nodeList = doc.getElementsByTagName("address");
  4562. test.equal(nodeList.length, 1, 'Asize');
  4563. testNode = nodeList.item(0);
  4564. vid = testNode.id;
  4565. test.equal(vid, "Test-ADDRESS", "idLink");
  4566. test.done();
  4567. },
  4568. /**
  4569. *
  4570. The id specifies the elements identifier.
  4571. Retrieve the id attribute of the CENTER element and examine its value.
  4572. * @author NIST
  4573. * @author Mary Brady
  4574. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  4575. */
  4576. HTMLElement29: function(test) {
  4577. var success;
  4578. var nodeList;
  4579. var testNode;
  4580. var vid;
  4581. var doc;
  4582. var docRef = null;
  4583. if (typeof(this.doc) != 'undefined') {
  4584. docRef = this.doc;
  4585. }
  4586. doc = load("element");
  4587. nodeList = doc.getElementsByTagName("center");
  4588. test.equal(nodeList.length, 2, 'Asize');
  4589. testNode = nodeList.item(0);
  4590. vid = testNode.id;
  4591. test.equal(vid, "Test-CENTER", "idLink");
  4592. test.done();
  4593. },
  4594. /**
  4595. *
  4596. The title attribute specifies the elements advisory title.
  4597. Retrieve the title attribute of the HEAD element and examine its value.
  4598. * @author NIST
  4599. * @author Mary Brady
  4600. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4601. */
  4602. HTMLElement30: function(test) {
  4603. var success;
  4604. var nodeList;
  4605. var testNode;
  4606. var vtitle;
  4607. var doc;
  4608. var docRef = null;
  4609. if (typeof(this.doc) != 'undefined') {
  4610. docRef = this.doc;
  4611. }
  4612. doc = load("element");
  4613. nodeList = doc.getElementsByTagName("head");
  4614. test.equal(nodeList.length, 1, 'Asize');
  4615. testNode = nodeList.item(0);
  4616. vtitle = testNode.title;
  4617. test.equal(vtitle, "HEAD Element", "titleLink");
  4618. test.done();
  4619. },
  4620. /**
  4621. *
  4622. The title attribute specifies the elements advisory title.
  4623. Retrieve the title attribute of the SUB element and examine its value.
  4624. * @author NIST
  4625. * @author Mary Brady
  4626. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4627. */
  4628. HTMLElement31: function(test) {
  4629. var success;
  4630. var nodeList;
  4631. var testNode;
  4632. var vtitle;
  4633. var doc;
  4634. var docRef = null;
  4635. if (typeof(this.doc) != 'undefined') {
  4636. docRef = this.doc;
  4637. }
  4638. doc = load("element");
  4639. nodeList = doc.getElementsByTagName("sub");
  4640. test.equal(nodeList.length, 1, 'Asize');
  4641. testNode = nodeList.item(0);
  4642. vtitle = testNode.title;
  4643. test.equal(vtitle, "SUB Element", "titleLink");
  4644. test.done();
  4645. },
  4646. /**
  4647. *
  4648. The title attribute specifies the elements advisory title.
  4649. Retrieve the title attribute of the SUP element and examine its value.
  4650. * @author NIST
  4651. * @author Mary Brady
  4652. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4653. */
  4654. HTMLElement32: function(test) {
  4655. var success;
  4656. var nodeList;
  4657. var testNode;
  4658. var vtitle;
  4659. var doc;
  4660. var docRef = null;
  4661. if (typeof(this.doc) != 'undefined') {
  4662. docRef = this.doc;
  4663. }
  4664. doc = load("element");
  4665. nodeList = doc.getElementsByTagName("sup");
  4666. test.equal(nodeList.length, 1, 'Asize');
  4667. testNode = nodeList.item(0);
  4668. vtitle = testNode.title;
  4669. test.equal(vtitle, "SUP Element", "titleLink");
  4670. test.done();
  4671. },
  4672. /**
  4673. *
  4674. The title attribute specifies the elements advisory title.
  4675. Retrieve the title attribute of the SPAN element and examine its value.
  4676. * @author NIST
  4677. * @author Mary Brady
  4678. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4679. */
  4680. HTMLElement33: function(test) {
  4681. var success;
  4682. var nodeList;
  4683. var testNode;
  4684. var vtitle;
  4685. var doc;
  4686. var docRef = null;
  4687. if (typeof(this.doc) != 'undefined') {
  4688. docRef = this.doc;
  4689. }
  4690. doc = load("element");
  4691. nodeList = doc.getElementsByTagName("span");
  4692. test.equal(nodeList.length, 1, 'Asize');
  4693. testNode = nodeList.item(0);
  4694. vtitle = testNode.title;
  4695. test.equal(vtitle, "SPAN Element", "titleLink");
  4696. test.done();
  4697. },
  4698. /**
  4699. *
  4700. The title attribute specifies the elements advisory title.
  4701. Retrieve the title attribute of the BDO element and examine its value.
  4702. * @author NIST
  4703. * @author Mary Brady
  4704. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4705. */
  4706. HTMLElement34: function(test) {
  4707. var success;
  4708. var nodeList;
  4709. var testNode;
  4710. var vtitle;
  4711. var doc;
  4712. var docRef = null;
  4713. if (typeof(this.doc) != 'undefined') {
  4714. docRef = this.doc;
  4715. }
  4716. doc = load("element");
  4717. nodeList = doc.getElementsByTagName("bdo");
  4718. test.equal(nodeList.length, 1, 'Asize');
  4719. testNode = nodeList.item(0);
  4720. vtitle = testNode.title;
  4721. test.equal(vtitle, "BDO Element", "titleLink");
  4722. test.done();
  4723. },
  4724. /**
  4725. *
  4726. The title attribute specifies the elements advisory title.
  4727. Retrieve the title attribute of the TT element and examine its value.
  4728. * @author NIST
  4729. * @author Mary Brady
  4730. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4731. */
  4732. HTMLElement35: function(test) {
  4733. var success;
  4734. var nodeList;
  4735. var testNode;
  4736. var vtitle;
  4737. var doc;
  4738. var docRef = null;
  4739. if (typeof(this.doc) != 'undefined') {
  4740. docRef = this.doc;
  4741. }
  4742. doc = load("element");
  4743. nodeList = doc.getElementsByTagName("tt");
  4744. test.equal(nodeList.length, 1, 'Asize');
  4745. testNode = nodeList.item(0);
  4746. vtitle = testNode.title;
  4747. test.equal(vtitle, "TT Element", "titleLink");
  4748. test.done();
  4749. },
  4750. /**
  4751. *
  4752. The title attribute specifies the elements advisory title.
  4753. Retrieve the title attribute of the I element and examine its value.
  4754. * @author NIST
  4755. * @author Mary Brady
  4756. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4757. */
  4758. HTMLElement36: function(test) {
  4759. var success;
  4760. var nodeList;
  4761. var testNode;
  4762. var vtitle;
  4763. var doc;
  4764. var docRef = null;
  4765. if (typeof(this.doc) != 'undefined') {
  4766. docRef = this.doc;
  4767. }
  4768. doc = load("element");
  4769. nodeList = doc.getElementsByTagName("i");
  4770. test.equal(nodeList.length, 1, 'Asize');
  4771. testNode = nodeList.item(0);
  4772. vtitle = testNode.title;
  4773. test.equal(vtitle, "I Element", "titleLink");
  4774. test.done();
  4775. },
  4776. /**
  4777. *
  4778. The title attribute specifies the elements advisory title.
  4779. Retrieve the title attribute of the B element and examine its value.
  4780. * @author NIST
  4781. * @author Mary Brady
  4782. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4783. */
  4784. HTMLElement37: function(test) {
  4785. var success;
  4786. var nodeList;
  4787. var testNode;
  4788. var vtitle;
  4789. var doc;
  4790. var docRef = null;
  4791. if (typeof(this.doc) != 'undefined') {
  4792. docRef = this.doc;
  4793. }
  4794. doc = load("element");
  4795. nodeList = doc.getElementsByTagName("b");
  4796. test.equal(nodeList.length, 1, 'Asize');
  4797. testNode = nodeList.item(0);
  4798. vtitle = testNode.title;
  4799. test.equal(vtitle, "B Element", "titleLink");
  4800. test.done();
  4801. },
  4802. /**
  4803. *
  4804. The title attribute specifies the elements advisory title.
  4805. Retrieve the title attribute of the U element and examine its value.
  4806. * @author NIST
  4807. * @author Mary Brady
  4808. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4809. */
  4810. HTMLElement38: function(test) {
  4811. var success;
  4812. var nodeList;
  4813. var testNode;
  4814. var vtitle;
  4815. var doc;
  4816. var docRef = null;
  4817. if (typeof(this.doc) != 'undefined') {
  4818. docRef = this.doc;
  4819. }
  4820. doc = load("element");
  4821. nodeList = doc.getElementsByTagName("u");
  4822. test.equal(nodeList.length, 1, 'Asize');
  4823. testNode = nodeList.item(0);
  4824. vtitle = testNode.title;
  4825. test.equal(vtitle, "U Element", "titleLink");
  4826. test.done();
  4827. },
  4828. /**
  4829. *
  4830. The title attribute specifies the elements advisory title.
  4831. Retrieve the title attribute of the S element and examine its value.
  4832. * @author NIST
  4833. * @author Mary Brady
  4834. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4835. */
  4836. HTMLElement39: function(test) {
  4837. var success;
  4838. var nodeList;
  4839. var testNode;
  4840. var vtitle;
  4841. var doc;
  4842. var docRef = null;
  4843. if (typeof(this.doc) != 'undefined') {
  4844. docRef = this.doc;
  4845. }
  4846. doc = load("element");
  4847. nodeList = doc.getElementsByTagName("s");
  4848. test.equal(nodeList.length, 1, 'Asize');
  4849. testNode = nodeList.item(0);
  4850. vtitle = testNode.title;
  4851. test.equal(vtitle, "S Element", "titleLink");
  4852. test.done();
  4853. },
  4854. /**
  4855. *
  4856. The title attribute specifies the elements advisory title.
  4857. Retrieve the title attribute of the STRIKE element and examine its value.
  4858. * @author NIST
  4859. * @author Mary Brady
  4860. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4861. */
  4862. HTMLElement40: function(test) {
  4863. var success;
  4864. var nodeList;
  4865. var testNode;
  4866. var vtitle;
  4867. var doc;
  4868. var docRef = null;
  4869. if (typeof(this.doc) != 'undefined') {
  4870. docRef = this.doc;
  4871. }
  4872. doc = load("element");
  4873. nodeList = doc.getElementsByTagName("strike");
  4874. test.equal(nodeList.length, 1, 'Asize');
  4875. testNode = nodeList.item(0);
  4876. vtitle = testNode.title;
  4877. test.equal(vtitle, "STRIKE Element", "titleLink");
  4878. test.done();
  4879. },
  4880. /**
  4881. *
  4882. The title attribute specifies the elements advisory title.
  4883. Retrieve the title attribute of the BIG element and examine its value.
  4884. * @author NIST
  4885. * @author Mary Brady
  4886. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4887. */
  4888. HTMLElement41: function(test) {
  4889. var success;
  4890. var nodeList;
  4891. var testNode;
  4892. var vtitle;
  4893. var doc;
  4894. var docRef = null;
  4895. if (typeof(this.doc) != 'undefined') {
  4896. docRef = this.doc;
  4897. }
  4898. doc = load("element");
  4899. nodeList = doc.getElementsByTagName("big");
  4900. test.equal(nodeList.length, 1, 'Asize');
  4901. testNode = nodeList.item(0);
  4902. vtitle = testNode.title;
  4903. test.equal(vtitle, "BIG Element", "titleLink");
  4904. test.done();
  4905. },
  4906. /**
  4907. *
  4908. The title attribute specifies the elements advisory title.
  4909. Retrieve the title attribute of the SMALL element and examine its value.
  4910. * @author NIST
  4911. * @author Mary Brady
  4912. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4913. */
  4914. HTMLElement42: function(test) {
  4915. var success;
  4916. var nodeList;
  4917. var testNode;
  4918. var vtitle;
  4919. var doc;
  4920. var docRef = null;
  4921. if (typeof(this.doc) != 'undefined') {
  4922. docRef = this.doc;
  4923. }
  4924. doc = load("element");
  4925. nodeList = doc.getElementsByTagName("small");
  4926. test.equal(nodeList.length, 1, 'Asize');
  4927. testNode = nodeList.item(0);
  4928. vtitle = testNode.title;
  4929. test.equal(vtitle, "SMALL Element", "titleLink");
  4930. test.done();
  4931. },
  4932. /**
  4933. *
  4934. The title attribute specifies the elements advisory title.
  4935. Retrieve the title attribute of the EM element and examine its value.
  4936. * @author NIST
  4937. * @author Mary Brady
  4938. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4939. */
  4940. HTMLElement43: function(test) {
  4941. var success;
  4942. var nodeList;
  4943. var testNode;
  4944. var vtitle;
  4945. var doc;
  4946. var docRef = null;
  4947. if (typeof(this.doc) != 'undefined') {
  4948. docRef = this.doc;
  4949. }
  4950. doc = load("element");
  4951. nodeList = doc.getElementsByTagName("em");
  4952. test.equal(nodeList.length, 1, 'Asize');
  4953. testNode = nodeList.item(0);
  4954. vtitle = testNode.title;
  4955. test.equal(vtitle, "EM Element", "titleLink");
  4956. test.done();
  4957. },
  4958. /**
  4959. *
  4960. The title attribute specifies the elements advisory title.
  4961. Retrieve the title attribute of the STRONG element and examine its value.
  4962. * @author NIST
  4963. * @author Mary Brady
  4964. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4965. */
  4966. HTMLElement44: function(test) {
  4967. var success;
  4968. var nodeList;
  4969. var testNode;
  4970. var vtitle;
  4971. var doc;
  4972. var docRef = null;
  4973. if (typeof(this.doc) != 'undefined') {
  4974. docRef = this.doc;
  4975. }
  4976. doc = load("element");
  4977. nodeList = doc.getElementsByTagName("strong");
  4978. test.equal(nodeList.length, 1, 'Asize');
  4979. testNode = nodeList.item(0);
  4980. vtitle = testNode.title;
  4981. test.equal(vtitle, "STRONG Element", "titleLink");
  4982. test.done();
  4983. },
  4984. /**
  4985. *
  4986. The title attribute specifies the elements advisory title.
  4987. Retrieve the title attribute of the DFN element and examine its value.
  4988. * @author NIST
  4989. * @author Mary Brady
  4990. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  4991. */
  4992. HTMLElement45: function(test) {
  4993. var success;
  4994. var nodeList;
  4995. var testNode;
  4996. var vtitle;
  4997. var doc;
  4998. var docRef = null;
  4999. if (typeof(this.doc) != 'undefined') {
  5000. docRef = this.doc;
  5001. }
  5002. doc = load("element");
  5003. nodeList = doc.getElementsByTagName("dfn");
  5004. test.equal(nodeList.length, 1, 'Asize');
  5005. testNode = nodeList.item(0);
  5006. vtitle = testNode.title;
  5007. test.equal(vtitle, "DFN Element", "titleLink");
  5008. test.done();
  5009. },
  5010. /**
  5011. *
  5012. The title attribute specifies the elements advisory title.
  5013. Retrieve the title attribute of the CODE element and examine its value.
  5014. * @author NIST
  5015. * @author Mary Brady
  5016. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5017. */
  5018. HTMLElement46: function(test) {
  5019. var success;
  5020. var nodeList;
  5021. var testNode;
  5022. var vtitle;
  5023. var doc;
  5024. var docRef = null;
  5025. if (typeof(this.doc) != 'undefined') {
  5026. docRef = this.doc;
  5027. }
  5028. doc = load("element");
  5029. nodeList = doc.getElementsByTagName("code");
  5030. test.equal(nodeList.length, 1, 'Asize');
  5031. testNode = nodeList.item(0);
  5032. vtitle = testNode.title;
  5033. test.equal(vtitle, "CODE Element", "titleLink");
  5034. test.done();
  5035. },
  5036. /**
  5037. *
  5038. The title attribute specifies the elements advisory title.
  5039. Retrieve the title attribute of the SAMP element and examine its value.
  5040. * @author NIST
  5041. * @author Mary Brady
  5042. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5043. */
  5044. HTMLElement47: function(test) {
  5045. var success;
  5046. var nodeList;
  5047. var testNode;
  5048. var vtitle;
  5049. var doc;
  5050. var docRef = null;
  5051. if (typeof(this.doc) != 'undefined') {
  5052. docRef = this.doc;
  5053. }
  5054. doc = load("element");
  5055. nodeList = doc.getElementsByTagName("samp");
  5056. test.equal(nodeList.length, 1, 'Asize');
  5057. testNode = nodeList.item(0);
  5058. vtitle = testNode.title;
  5059. test.equal(vtitle, "SAMP Element", "titleLink");
  5060. test.done();
  5061. },
  5062. /**
  5063. *
  5064. The title attribute specifies the elements advisory title.
  5065. Retrieve the title attribute of the KBD element and examine its value.
  5066. * @author NIST
  5067. * @author Mary Brady
  5068. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5069. */
  5070. HTMLElement48: function(test) {
  5071. var success;
  5072. var nodeList;
  5073. var testNode;
  5074. var vtitle;
  5075. var doc;
  5076. var docRef = null;
  5077. if (typeof(this.doc) != 'undefined') {
  5078. docRef = this.doc;
  5079. }
  5080. doc = load("element");
  5081. nodeList = doc.getElementsByTagName("kbd");
  5082. test.equal(nodeList.length, 1, 'Asize');
  5083. testNode = nodeList.item(0);
  5084. vtitle = testNode.title;
  5085. test.equal(vtitle, "KBD Element", "titleLink");
  5086. test.done();
  5087. },
  5088. /**
  5089. *
  5090. The title attribute specifies the elements advisory title.
  5091. Retrieve the title attribute of the VAR element and examine its value.
  5092. * @author NIST
  5093. * @author Mary Brady
  5094. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5095. */
  5096. HTMLElement49: function(test) {
  5097. var success;
  5098. var nodeList;
  5099. var testNode;
  5100. var vtitle;
  5101. var doc;
  5102. var docRef = null;
  5103. if (typeof(this.doc) != 'undefined') {
  5104. docRef = this.doc;
  5105. }
  5106. doc = load("element");
  5107. nodeList = doc.getElementsByTagName("var");
  5108. test.equal(nodeList.length, 1, 'Asize');
  5109. testNode = nodeList.item(0);
  5110. vtitle = testNode.title;
  5111. test.equal(vtitle, "VAR Element", "titleLink");
  5112. test.done();
  5113. },
  5114. /**
  5115. *
  5116. The title attribute specifies the elements advisory title.
  5117. Retrieve the title attribute of the CITE element and examine its value.
  5118. * @author NIST
  5119. * @author Mary Brady
  5120. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5121. */
  5122. HTMLElement50: function(test) {
  5123. var success;
  5124. var nodeList;
  5125. var testNode;
  5126. var vtitle;
  5127. var doc;
  5128. var docRef = null;
  5129. if (typeof(this.doc) != 'undefined') {
  5130. docRef = this.doc;
  5131. }
  5132. doc = load("element");
  5133. nodeList = doc.getElementsByTagName("cite");
  5134. test.equal(nodeList.length, 1, 'Asize');
  5135. testNode = nodeList.item(0);
  5136. vtitle = testNode.title;
  5137. test.equal(vtitle, "CITE Element", "titleLink");
  5138. test.done();
  5139. },
  5140. /**
  5141. *
  5142. The title attribute specifies the elements advisory title.
  5143. Retrieve the title attribute of the ACRONYM element and examine its value.
  5144. * @author NIST
  5145. * @author Mary Brady
  5146. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5147. */
  5148. HTMLElement51: function(test) {
  5149. var success;
  5150. var nodeList;
  5151. var testNode;
  5152. var vtitle;
  5153. var doc;
  5154. var docRef = null;
  5155. if (typeof(this.doc) != 'undefined') {
  5156. docRef = this.doc;
  5157. }
  5158. doc = load("element");
  5159. nodeList = doc.getElementsByTagName("acronym");
  5160. test.equal(nodeList.length, 1, 'Asize');
  5161. testNode = nodeList.item(0);
  5162. vtitle = testNode.title;
  5163. test.equal(vtitle, "ACRONYM Element", "titleLink");
  5164. test.done();
  5165. },
  5166. /**
  5167. *
  5168. The title attribute specifies the elements advisory title.
  5169. Retrieve the title attribute of the ABBR element and examine its value.
  5170. * @author NIST
  5171. * @author Mary Brady
  5172. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5173. */
  5174. HTMLElement52: function(test) {
  5175. var success;
  5176. var nodeList;
  5177. var testNode;
  5178. var vtitle;
  5179. var doc;
  5180. var docRef = null;
  5181. if (typeof(this.doc) != 'undefined') {
  5182. docRef = this.doc;
  5183. }
  5184. doc = load("element");
  5185. nodeList = doc.getElementsByTagName("abbr");
  5186. test.equal(nodeList.length, 1, 'Asize');
  5187. testNode = nodeList.item(0);
  5188. vtitle = testNode.title;
  5189. test.equal(vtitle, "ABBR Element", "titleLink");
  5190. test.done();
  5191. },
  5192. /**
  5193. *
  5194. The title attribute specifies the elements advisory title.
  5195. Retrieve the title attribute of the DD element and examine its value.
  5196. * @author NIST
  5197. * @author Mary Brady
  5198. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5199. */
  5200. HTMLElement53: function(test) {
  5201. var success;
  5202. var nodeList;
  5203. var testNode;
  5204. var vtitle;
  5205. var doc;
  5206. var docRef = null;
  5207. if (typeof(this.doc) != 'undefined') {
  5208. docRef = this.doc;
  5209. }
  5210. doc = load("element");
  5211. nodeList = doc.getElementsByTagName("dd");
  5212. test.equal(nodeList.length, 4, 'Asize');
  5213. testNode = nodeList.item(0);
  5214. vtitle = testNode.title;
  5215. test.equal(vtitle, "DD Element", "titleLink");
  5216. test.done();
  5217. },
  5218. /**
  5219. *
  5220. The title attribute specifies the elements advisory title.
  5221. Retrieve the title attribute of the DT element and examine its value.
  5222. * @author NIST
  5223. * @author Mary Brady
  5224. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5225. */
  5226. HTMLElement54: function(test) {
  5227. var success;
  5228. var nodeList;
  5229. var testNode;
  5230. var vtitle;
  5231. var doc;
  5232. var docRef = null;
  5233. if (typeof(this.doc) != 'undefined') {
  5234. docRef = this.doc;
  5235. }
  5236. doc = load("element");
  5237. nodeList = doc.getElementsByTagName("dt");
  5238. test.equal(nodeList.length, 1, 'Asize');
  5239. testNode = nodeList.item(0);
  5240. vtitle = testNode.title;
  5241. test.equal(vtitle, "DT Element", "titleLink");
  5242. test.done();
  5243. },
  5244. /**
  5245. *
  5246. The title attribute specifies the elements advisory title.
  5247. Retrieve the title attribute of the NOFRAMES element and examine its value.
  5248. * @author NIST
  5249. * @author Mary Brady
  5250. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5251. */
  5252. HTMLElement55: function(test) {
  5253. var success;
  5254. var nodeList;
  5255. var testNode;
  5256. var vtitle;
  5257. var doc;
  5258. var docRef = null;
  5259. if (typeof(this.doc) != 'undefined') {
  5260. docRef = this.doc;
  5261. }
  5262. doc = load("element");
  5263. nodeList = doc.getElementsByTagName("noframes");
  5264. test.equal(nodeList.length, 1, 'Asize');
  5265. testNode = nodeList.item(0);
  5266. vtitle = testNode.title;
  5267. test.equal(vtitle, "NOFRAMES Element", "titleLink");
  5268. test.done();
  5269. },
  5270. /**
  5271. *
  5272. The title attribute specifies the elements advisory title.
  5273. Retrieve the title attribute of the NOSCRIPT element and examine its value.
  5274. * @author NIST
  5275. * @author Mary Brady
  5276. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5277. */
  5278. HTMLElement56: function(test) {
  5279. var success;
  5280. var nodeList;
  5281. var testNode;
  5282. var vtitle;
  5283. var doc;
  5284. var docRef = null;
  5285. if (typeof(this.doc) != 'undefined') {
  5286. docRef = this.doc;
  5287. }
  5288. doc = load("element");
  5289. nodeList = doc.getElementsByTagName("noscript");
  5290. test.equal(nodeList.length, 1, 'Asize');
  5291. testNode = nodeList.item(0);
  5292. vtitle = testNode.title;
  5293. test.equal(vtitle, "NOSCRIPT Element", "titleLink");
  5294. test.done();
  5295. },
  5296. /**
  5297. *
  5298. The title attribute specifies the elements advisory title.
  5299. Retrieve the title attribute of the ADDRESS element and examine its value.
  5300. * @author NIST
  5301. * @author Mary Brady
  5302. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5303. */
  5304. HTMLElement57: function(test) {
  5305. var success;
  5306. var nodeList;
  5307. var testNode;
  5308. var vtitle;
  5309. var doc;
  5310. var docRef = null;
  5311. if (typeof(this.doc) != 'undefined') {
  5312. docRef = this.doc;
  5313. }
  5314. doc = load("element");
  5315. nodeList = doc.getElementsByTagName("address");
  5316. test.equal(nodeList.length, 1, 'Asize');
  5317. testNode = nodeList.item(0);
  5318. vtitle = testNode.title;
  5319. test.equal(vtitle, "ADDRESS Element", "titleLink");
  5320. test.done();
  5321. },
  5322. /**
  5323. *
  5324. The title attribute specifies the elements advisory title.
  5325. Retrieve the title attribute of the CENTER element and examine its value.
  5326. * @author NIST
  5327. * @author Mary Brady
  5328. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
  5329. */
  5330. HTMLElement58: function(test) {
  5331. var success;
  5332. var nodeList;
  5333. var testNode;
  5334. var vtitle;
  5335. var doc;
  5336. var docRef = null;
  5337. if (typeof(this.doc) != 'undefined') {
  5338. docRef = this.doc;
  5339. }
  5340. doc = load("element");
  5341. nodeList = doc.getElementsByTagName("center");
  5342. test.equal(nodeList.length, 2, 'Asize');
  5343. testNode = nodeList.item(0);
  5344. vtitle = testNode.title;
  5345. test.equal(vtitle, "CENTER Element", "titleLink");
  5346. test.done();
  5347. },
  5348. /**
  5349. *
  5350. The lang attribute specifies the language code defined in RFC 1766.
  5351. Retrieve the lang attribute of the HEAD element and examine its value.
  5352. * @author NIST
  5353. * @author Mary Brady
  5354. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5355. */
  5356. HTMLElement59: function(test) {
  5357. var success;
  5358. var nodeList;
  5359. var testNode;
  5360. var vlang;
  5361. var doc;
  5362. var docRef = null;
  5363. if (typeof(this.doc) != 'undefined') {
  5364. docRef = this.doc;
  5365. }
  5366. doc = load("element");
  5367. nodeList = doc.getElementsByTagName("head");
  5368. test.equal(nodeList.length, 1, 'Asize');
  5369. testNode = nodeList.item(0);
  5370. vlang = testNode.lang;
  5371. test.equal(vlang, "en", "langLink");
  5372. test.done();
  5373. },
  5374. /**
  5375. *
  5376. The lang attribute specifies the language code defined in RFC 1766.
  5377. Retrieve the lang attribute of the SUB element and examine its value.
  5378. * @author NIST
  5379. * @author Mary Brady
  5380. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5381. */
  5382. HTMLElement60: function(test) {
  5383. var success;
  5384. var nodeList;
  5385. var testNode;
  5386. var vlang;
  5387. var doc;
  5388. var docRef = null;
  5389. if (typeof(this.doc) != 'undefined') {
  5390. docRef = this.doc;
  5391. }
  5392. doc = load("element");
  5393. nodeList = doc.getElementsByTagName("sub");
  5394. test.equal(nodeList.length, 1, 'Asize');
  5395. testNode = nodeList.item(0);
  5396. vlang = testNode.lang;
  5397. test.equal(vlang, "en", "langLink");
  5398. test.done();
  5399. },
  5400. /**
  5401. *
  5402. The lang attribute specifies the language code defined in RFC 1766.
  5403. Retrieve the lang attribute of the SUP element and examine its value.
  5404. * @author NIST
  5405. * @author Mary Brady
  5406. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5407. */
  5408. HTMLElement61: function(test) {
  5409. var success;
  5410. var nodeList;
  5411. var testNode;
  5412. var vlang;
  5413. var doc;
  5414. var docRef = null;
  5415. if (typeof(this.doc) != 'undefined') {
  5416. docRef = this.doc;
  5417. }
  5418. doc = load("element");
  5419. nodeList = doc.getElementsByTagName("sup");
  5420. test.equal(nodeList.length, 1, 'Asize');
  5421. testNode = nodeList.item(0);
  5422. vlang = testNode.lang;
  5423. test.equal(vlang, "en", "langLink");
  5424. test.done();
  5425. },
  5426. /**
  5427. *
  5428. The lang attribute specifies the language code defined in RFC 1766.
  5429. Retrieve the lang attribute of the SPAN element and examine its value.
  5430. * @author NIST
  5431. * @author Mary Brady
  5432. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5433. */
  5434. HTMLElement62: function(test) {
  5435. var success;
  5436. var nodeList;
  5437. var testNode;
  5438. var vlang;
  5439. var doc;
  5440. var docRef = null;
  5441. if (typeof(this.doc) != 'undefined') {
  5442. docRef = this.doc;
  5443. }
  5444. doc = load("element");
  5445. nodeList = doc.getElementsByTagName("span");
  5446. test.equal(nodeList.length, 1, 'Asize');
  5447. testNode = nodeList.item(0);
  5448. vlang = testNode.lang;
  5449. test.equal(vlang, "en", "langLink");
  5450. test.done();
  5451. },
  5452. /**
  5453. *
  5454. The lang attribute specifies the language code defined in RFC 1766.
  5455. Retrieve the lang attribute of the BDO element and examine its value.
  5456. * @author NIST
  5457. * @author Mary Brady
  5458. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5459. */
  5460. HTMLElement63: function(test) {
  5461. var success;
  5462. var nodeList;
  5463. var testNode;
  5464. var vlang;
  5465. var doc;
  5466. var docRef = null;
  5467. if (typeof(this.doc) != 'undefined') {
  5468. docRef = this.doc;
  5469. }
  5470. doc = load("element");
  5471. nodeList = doc.getElementsByTagName("bdo");
  5472. test.equal(nodeList.length, 1, 'Asize');
  5473. testNode = nodeList.item(0);
  5474. vlang = testNode.lang;
  5475. test.equal(vlang, "en", "langLink");
  5476. test.done();
  5477. },
  5478. /**
  5479. *
  5480. The lang attribute specifies the language code defined in RFC 1766.
  5481. Retrieve the lang attribute of the TT element and examine its value.
  5482. * @author NIST
  5483. * @author Mary Brady
  5484. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5485. */
  5486. HTMLElement64: function(test) {
  5487. var success;
  5488. var nodeList;
  5489. var testNode;
  5490. var vlang;
  5491. var doc;
  5492. var docRef = null;
  5493. if (typeof(this.doc) != 'undefined') {
  5494. docRef = this.doc;
  5495. }
  5496. doc = load("element");
  5497. nodeList = doc.getElementsByTagName("tt");
  5498. test.equal(nodeList.length, 1, 'Asize');
  5499. testNode = nodeList.item(0);
  5500. vlang = testNode.lang;
  5501. test.equal(vlang, "en", "langLink");
  5502. test.done();
  5503. },
  5504. /**
  5505. *
  5506. The lang attribute specifies the language code defined in RFC 1766.
  5507. Retrieve the lang attribute of the I element and examine its value.
  5508. * @author NIST
  5509. * @author Mary Brady
  5510. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5511. */
  5512. HTMLElement65: function(test) {
  5513. var success;
  5514. var nodeList;
  5515. var testNode;
  5516. var vlang;
  5517. var doc;
  5518. var docRef = null;
  5519. if (typeof(this.doc) != 'undefined') {
  5520. docRef = this.doc;
  5521. }
  5522. doc = load("element");
  5523. nodeList = doc.getElementsByTagName("i");
  5524. test.equal(nodeList.length, 1, 'Asize');
  5525. testNode = nodeList.item(0);
  5526. vlang = testNode.lang;
  5527. test.equal(vlang, "en", "langLink");
  5528. test.done();
  5529. },
  5530. /**
  5531. *
  5532. The lang attribute specifies the language code defined in RFC 1766.
  5533. Retrieve the lang attribute of the B element and examine its value.
  5534. * @author NIST
  5535. * @author Mary Brady
  5536. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5537. */
  5538. HTMLElement66: function(test) {
  5539. var success;
  5540. var nodeList;
  5541. var testNode;
  5542. var vlang;
  5543. var doc;
  5544. var docRef = null;
  5545. if (typeof(this.doc) != 'undefined') {
  5546. docRef = this.doc;
  5547. }
  5548. doc = load("element");
  5549. nodeList = doc.getElementsByTagName("b");
  5550. test.equal(nodeList.length, 1, 'Asize');
  5551. testNode = nodeList.item(0);
  5552. vlang = testNode.lang;
  5553. test.equal(vlang, "en", "langLink");
  5554. test.done();
  5555. },
  5556. /**
  5557. *
  5558. The lang attribute specifies the language code defined in RFC 1766.
  5559. Retrieve the lang attribute of the U element and examine its value.
  5560. * @author NIST
  5561. * @author Mary Brady
  5562. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5563. */
  5564. HTMLElement67: function(test) {
  5565. var success;
  5566. var nodeList;
  5567. var testNode;
  5568. var vlang;
  5569. var doc;
  5570. var docRef = null;
  5571. if (typeof(this.doc) != 'undefined') {
  5572. docRef = this.doc;
  5573. }
  5574. doc = load("element");
  5575. nodeList = doc.getElementsByTagName("u");
  5576. test.equal(nodeList.length, 1, 'Asize');
  5577. testNode = nodeList.item(0);
  5578. vlang = testNode.lang;
  5579. test.equal(vlang, "en", "langLink");
  5580. test.done();
  5581. },
  5582. /**
  5583. *
  5584. The lang attribute specifies the language code defined in RFC 1766.
  5585. Retrieve the lang attribute of the S element and examine its value.
  5586. * @author NIST
  5587. * @author Mary Brady
  5588. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5589. */
  5590. HTMLElement68: function(test) {
  5591. var success;
  5592. var nodeList;
  5593. var testNode;
  5594. var vlang;
  5595. var doc;
  5596. var docRef = null;
  5597. if (typeof(this.doc) != 'undefined') {
  5598. docRef = this.doc;
  5599. }
  5600. doc = load("element");
  5601. nodeList = doc.getElementsByTagName("s");
  5602. test.equal(nodeList.length, 1, 'Asize');
  5603. testNode = nodeList.item(0);
  5604. vlang = testNode.lang;
  5605. test.equal(vlang, "en", "langLink");
  5606. test.done();
  5607. },
  5608. /**
  5609. *
  5610. The lang attribute specifies the language code defined in RFC 1766.
  5611. Retrieve the lang attribute of the STRIKE element and examine its value.
  5612. * @author NIST
  5613. * @author Mary Brady
  5614. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5615. */
  5616. HTMLElement69: function(test) {
  5617. var success;
  5618. var nodeList;
  5619. var testNode;
  5620. var vlang;
  5621. var doc;
  5622. var docRef = null;
  5623. if (typeof(this.doc) != 'undefined') {
  5624. docRef = this.doc;
  5625. }
  5626. doc = load("element");
  5627. nodeList = doc.getElementsByTagName("strike");
  5628. test.equal(nodeList.length, 1, 'Asize');
  5629. testNode = nodeList.item(0);
  5630. vlang = testNode.lang;
  5631. test.equal(vlang, "en", "langLink");
  5632. test.done();
  5633. },
  5634. /**
  5635. *
  5636. The lang attribute specifies the language code defined in RFC 1766.
  5637. Retrieve the lang attribute of the BIG element and examine its value.
  5638. * @author NIST
  5639. * @author Mary Brady
  5640. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5641. */
  5642. HTMLElement70: function(test) {
  5643. var success;
  5644. var nodeList;
  5645. var testNode;
  5646. var vlang;
  5647. var doc;
  5648. var docRef = null;
  5649. if (typeof(this.doc) != 'undefined') {
  5650. docRef = this.doc;
  5651. }
  5652. doc = load("element");
  5653. nodeList = doc.getElementsByTagName("big");
  5654. test.equal(nodeList.length, 1, 'Asize');
  5655. testNode = nodeList.item(0);
  5656. vlang = testNode.lang;
  5657. test.equal(vlang, "en", "langLink");
  5658. test.done();
  5659. },
  5660. /**
  5661. *
  5662. The lang attribute specifies the language code defined in RFC 1766.
  5663. Retrieve the lang attribute of the SMALL element and examine its value.
  5664. * @author NIST
  5665. * @author Mary Brady
  5666. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5667. */
  5668. HTMLElement71: function(test) {
  5669. var success;
  5670. var nodeList;
  5671. var testNode;
  5672. var vlang;
  5673. var doc;
  5674. var docRef = null;
  5675. if (typeof(this.doc) != 'undefined') {
  5676. docRef = this.doc;
  5677. }
  5678. doc = load("element");
  5679. nodeList = doc.getElementsByTagName("small");
  5680. test.equal(nodeList.length, 1, 'Asize');
  5681. testNode = nodeList.item(0);
  5682. vlang = testNode.lang;
  5683. test.equal(vlang, "en", "langLink");
  5684. test.done();
  5685. },
  5686. /**
  5687. *
  5688. The lang attribute specifies the language code defined in RFC 1766.
  5689. Retrieve the lang attribute of the EM element and examine its value.
  5690. * @author NIST
  5691. * @author Mary Brady
  5692. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5693. */
  5694. HTMLElement72: function(test) {
  5695. var success;
  5696. var nodeList;
  5697. var testNode;
  5698. var vlang;
  5699. var doc;
  5700. var docRef = null;
  5701. if (typeof(this.doc) != 'undefined') {
  5702. docRef = this.doc;
  5703. }
  5704. doc = load("element");
  5705. nodeList = doc.getElementsByTagName("em");
  5706. test.equal(nodeList.length, 1, 'Asize');
  5707. testNode = nodeList.item(0);
  5708. vlang = testNode.lang;
  5709. test.equal(vlang, "en", "langLink");
  5710. test.done();
  5711. },
  5712. /**
  5713. *
  5714. The lang attribute specifies the language code defined in RFC 1766.
  5715. Retrieve the lang attribute of the STRONG element and examine its value.
  5716. * @author NIST
  5717. * @author Mary Brady
  5718. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5719. */
  5720. HTMLElement73: function(test) {
  5721. var success;
  5722. var nodeList;
  5723. var testNode;
  5724. var vlang;
  5725. var doc;
  5726. var docRef = null;
  5727. if (typeof(this.doc) != 'undefined') {
  5728. docRef = this.doc;
  5729. }
  5730. doc = load("element");
  5731. nodeList = doc.getElementsByTagName("strong");
  5732. test.equal(nodeList.length, 1, 'Asize');
  5733. testNode = nodeList.item(0);
  5734. vlang = testNode.lang;
  5735. test.equal(vlang, "en", "langLink");
  5736. test.done();
  5737. },
  5738. /**
  5739. *
  5740. The lang attribute specifies the language code defined in RFC 1766.
  5741. Retrieve the lang attribute of the DFN element and examine its value.
  5742. * @author NIST
  5743. * @author Mary Brady
  5744. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5745. */
  5746. HTMLElement74: function(test) {
  5747. var success;
  5748. var nodeList;
  5749. var testNode;
  5750. var vlang;
  5751. var doc;
  5752. var docRef = null;
  5753. if (typeof(this.doc) != 'undefined') {
  5754. docRef = this.doc;
  5755. }
  5756. doc = load("element");
  5757. nodeList = doc.getElementsByTagName("dfn");
  5758. test.equal(nodeList.length, 1, 'Asize');
  5759. testNode = nodeList.item(0);
  5760. vlang = testNode.lang;
  5761. test.equal(vlang, "en", "langLink");
  5762. test.done();
  5763. },
  5764. /**
  5765. *
  5766. The lang attribute specifies the language code defined in RFC 1766.
  5767. Retrieve the lang attribute of the CODE element and examine its value.
  5768. * @author NIST
  5769. * @author Mary Brady
  5770. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5771. */
  5772. HTMLElement75: function(test) {
  5773. var success;
  5774. var nodeList;
  5775. var testNode;
  5776. var vlang;
  5777. var doc;
  5778. var docRef = null;
  5779. if (typeof(this.doc) != 'undefined') {
  5780. docRef = this.doc;
  5781. }
  5782. doc = load("element");
  5783. nodeList = doc.getElementsByTagName("code");
  5784. test.equal(nodeList.length, 1, 'Asize');
  5785. testNode = nodeList.item(0);
  5786. vlang = testNode.lang;
  5787. test.equal(vlang, "en", "langLink");
  5788. test.done();
  5789. },
  5790. /**
  5791. *
  5792. The lang attribute specifies the language code defined in RFC 1766.
  5793. Retrieve the lang attribute of the SAMP element and examine its value.
  5794. * @author NIST
  5795. * @author Mary Brady
  5796. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5797. */
  5798. HTMLElement76: function(test) {
  5799. var success;
  5800. var nodeList;
  5801. var testNode;
  5802. var vlang;
  5803. var doc;
  5804. var docRef = null;
  5805. if (typeof(this.doc) != 'undefined') {
  5806. docRef = this.doc;
  5807. }
  5808. doc = load("element");
  5809. nodeList = doc.getElementsByTagName("samp");
  5810. test.equal(nodeList.length, 1, 'Asize');
  5811. testNode = nodeList.item(0);
  5812. vlang = testNode.lang;
  5813. test.equal(vlang, "en", "langLink");
  5814. test.done();
  5815. },
  5816. /**
  5817. *
  5818. The lang attribute specifies the language code defined in RFC 1766.
  5819. Retrieve the lang attribute of the KBD element and examine its value.
  5820. * @author NIST
  5821. * @author Mary Brady
  5822. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5823. */
  5824. HTMLElement77: function(test) {
  5825. var success;
  5826. var nodeList;
  5827. var testNode;
  5828. var vlang;
  5829. var doc;
  5830. var docRef = null;
  5831. if (typeof(this.doc) != 'undefined') {
  5832. docRef = this.doc;
  5833. }
  5834. doc = load("element");
  5835. nodeList = doc.getElementsByTagName("kbd");
  5836. test.equal(nodeList.length, 1, 'Asize');
  5837. testNode = nodeList.item(0);
  5838. vlang = testNode.lang;
  5839. test.equal(vlang, "en", "langLink");
  5840. test.done();
  5841. },
  5842. /**
  5843. *
  5844. The lang attribute specifies the language code defined in RFC 1766.
  5845. Retrieve the lang attribute of the VAR element and examine its value.
  5846. * @author NIST
  5847. * @author Mary Brady
  5848. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5849. */
  5850. HTMLElement78: function(test) {
  5851. var success;
  5852. var nodeList;
  5853. var testNode;
  5854. var vlang;
  5855. var doc;
  5856. var docRef = null;
  5857. if (typeof(this.doc) != 'undefined') {
  5858. docRef = this.doc;
  5859. }
  5860. doc = load("element");
  5861. nodeList = doc.getElementsByTagName("var");
  5862. test.equal(nodeList.length, 1, 'Asize');
  5863. testNode = nodeList.item(0);
  5864. vlang = testNode.lang;
  5865. test.equal(vlang, "en", "langLink");
  5866. test.done();
  5867. },
  5868. /**
  5869. *
  5870. The lang attribute specifies the language code defined in RFC 1766.
  5871. Retrieve the lang attribute of the CITE element and examine its value.
  5872. * @author NIST
  5873. * @author Mary Brady
  5874. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5875. */
  5876. HTMLElement79: function(test) {
  5877. var success;
  5878. var nodeList;
  5879. var testNode;
  5880. var vlang;
  5881. var doc;
  5882. var docRef = null;
  5883. if (typeof(this.doc) != 'undefined') {
  5884. docRef = this.doc;
  5885. }
  5886. doc = load("element");
  5887. nodeList = doc.getElementsByTagName("cite");
  5888. test.equal(nodeList.length, 1, 'Asize');
  5889. testNode = nodeList.item(0);
  5890. vlang = testNode.lang;
  5891. test.equal(vlang, "en", "langLink");
  5892. test.done();
  5893. },
  5894. /**
  5895. *
  5896. The lang attribute specifies the language code defined in RFC 1766.
  5897. Retrieve the lang attribute of the ACRONYM element and examine its value.
  5898. * @author NIST
  5899. * @author Mary Brady
  5900. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5901. */
  5902. HTMLElement80: function(test) {
  5903. var success;
  5904. var nodeList;
  5905. var testNode;
  5906. var vlang;
  5907. var doc;
  5908. var docRef = null;
  5909. if (typeof(this.doc) != 'undefined') {
  5910. docRef = this.doc;
  5911. }
  5912. doc = load("element");
  5913. nodeList = doc.getElementsByTagName("acronym");
  5914. test.equal(nodeList.length, 1, 'Asize');
  5915. testNode = nodeList.item(0);
  5916. vlang = testNode.lang;
  5917. test.equal(vlang, "en", "langLink");
  5918. test.done();
  5919. },
  5920. /**
  5921. *
  5922. The lang attribute specifies the language code defined in RFC 1766.
  5923. Retrieve the lang attribute of the ABBR element and examine its value.
  5924. * @author NIST
  5925. * @author Mary Brady
  5926. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5927. */
  5928. HTMLElement81: function(test) {
  5929. var success;
  5930. var nodeList;
  5931. var testNode;
  5932. var vlang;
  5933. var doc;
  5934. var docRef = null;
  5935. if (typeof(this.doc) != 'undefined') {
  5936. docRef = this.doc;
  5937. }
  5938. doc = load("element");
  5939. nodeList = doc.getElementsByTagName("abbr");
  5940. test.equal(nodeList.length, 1, 'Asize');
  5941. testNode = nodeList.item(0);
  5942. vlang = testNode.lang;
  5943. test.equal(vlang, "en", "langLink");
  5944. test.done();
  5945. },
  5946. /**
  5947. *
  5948. The lang attribute specifies the language code defined in RFC 1766.
  5949. Retrieve the lang attribute of the DD element and examine its value.
  5950. * @author NIST
  5951. * @author Mary Brady
  5952. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5953. */
  5954. HTMLElement82: function(test) {
  5955. var success;
  5956. var nodeList;
  5957. var testNode;
  5958. var vlang;
  5959. var doc;
  5960. var docRef = null;
  5961. if (typeof(this.doc) != 'undefined') {
  5962. docRef = this.doc;
  5963. }
  5964. doc = load("element");
  5965. nodeList = doc.getElementsByTagName("dd");
  5966. test.equal(nodeList.length, 4, 'Asize');
  5967. testNode = nodeList.item(0);
  5968. vlang = testNode.lang;
  5969. test.equal(vlang, "en", "langLink");
  5970. test.done();
  5971. },
  5972. /**
  5973. *
  5974. The lang attribute specifies the language code defined in RFC 1766.
  5975. Retrieve the lang attribute of the DT element and examine its value.
  5976. * @author NIST
  5977. * @author Mary Brady
  5978. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  5979. */
  5980. HTMLElement83: function(test) {
  5981. var success;
  5982. var nodeList;
  5983. var testNode;
  5984. var vlang;
  5985. var doc;
  5986. var docRef = null;
  5987. if (typeof(this.doc) != 'undefined') {
  5988. docRef = this.doc;
  5989. }
  5990. doc = load("element");
  5991. nodeList = doc.getElementsByTagName("dt");
  5992. test.equal(nodeList.length, 1, 'Asize');
  5993. testNode = nodeList.item(0);
  5994. vlang = testNode.lang;
  5995. test.equal(vlang, "en", "langLink");
  5996. test.done();
  5997. },
  5998. /**
  5999. *
  6000. The lang attribute specifies the language code defined in RFC 1766.
  6001. Retrieve the lang attribute of the NOFRAMES element and examine its value.
  6002. * @author NIST
  6003. * @author Mary Brady
  6004. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  6005. */
  6006. HTMLElement84: function(test) {
  6007. var success;
  6008. var nodeList;
  6009. var testNode;
  6010. var vlang;
  6011. var doc;
  6012. var docRef = null;
  6013. if (typeof(this.doc) != 'undefined') {
  6014. docRef = this.doc;
  6015. }
  6016. doc = load("element");
  6017. nodeList = doc.getElementsByTagName("noframes");
  6018. test.equal(nodeList.length, 1, 'Asize');
  6019. testNode = nodeList.item(0);
  6020. vlang = testNode.lang;
  6021. test.equal(vlang, "en", "langLink");
  6022. test.done();
  6023. },
  6024. /**
  6025. *
  6026. The lang attribute specifies the language code defined in RFC 1766.
  6027. Retrieve the lang attribute of the NOSCRIPT element and examine its value.
  6028. * @author NIST
  6029. * @author Mary Brady
  6030. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  6031. */
  6032. HTMLElement85: function(test) {
  6033. var success;
  6034. var nodeList;
  6035. var testNode;
  6036. var vlang;
  6037. var doc;
  6038. var docRef = null;
  6039. if (typeof(this.doc) != 'undefined') {
  6040. docRef = this.doc;
  6041. }
  6042. doc = load("element");
  6043. nodeList = doc.getElementsByTagName("noscript");
  6044. test.equal(nodeList.length, 1, 'Asize');
  6045. testNode = nodeList.item(0);
  6046. vlang = testNode.lang;
  6047. test.equal(vlang, "en", "langLink");
  6048. test.done();
  6049. },
  6050. /**
  6051. *
  6052. The lang attribute specifies the language code defined in RFC 1766.
  6053. Retrieve the lang attribute of the ADDRESS element and examine its value.
  6054. * @author NIST
  6055. * @author Mary Brady
  6056. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  6057. */
  6058. HTMLElement86: function(test) {
  6059. var success;
  6060. var nodeList;
  6061. var testNode;
  6062. var vlang;
  6063. var doc;
  6064. var docRef = null;
  6065. if (typeof(this.doc) != 'undefined') {
  6066. docRef = this.doc;
  6067. }
  6068. doc = load("element");
  6069. nodeList = doc.getElementsByTagName("address");
  6070. test.equal(nodeList.length, 1, 'Asize');
  6071. testNode = nodeList.item(0);
  6072. vlang = testNode.lang;
  6073. test.equal(vlang, "en", "langLink");
  6074. test.done();
  6075. },
  6076. /**
  6077. *
  6078. The lang attribute specifies the language code defined in RFC 1766.
  6079. Retrieve the lang attribute of the CENTER element and examine its value.
  6080. * @author NIST
  6081. * @author Mary Brady
  6082. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
  6083. */
  6084. HTMLElement87: function(test) {
  6085. var success;
  6086. var nodeList;
  6087. var testNode;
  6088. var vlang;
  6089. var doc;
  6090. var docRef = null;
  6091. if (typeof(this.doc) != 'undefined') {
  6092. docRef = this.doc;
  6093. }
  6094. doc = load("element");
  6095. nodeList = doc.getElementsByTagName("center");
  6096. test.equal(nodeList.length, 2, 'Asize');
  6097. testNode = nodeList.item(0);
  6098. vlang = testNode.lang;
  6099. test.equal(vlang, "en", "langLink");
  6100. test.done();
  6101. },
  6102. /**
  6103. *
  6104. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6105. Retrieve the dir attribute of the HEAD element and examine its value.
  6106. * @author NIST
  6107. * @author Mary Brady
  6108. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6109. */
  6110. HTMLElement88: function(test) {
  6111. var success;
  6112. var nodeList;
  6113. var testNode;
  6114. var vdir;
  6115. var doc;
  6116. var docRef = null;
  6117. if (typeof(this.doc) != 'undefined') {
  6118. docRef = this.doc;
  6119. }
  6120. doc = load("element");
  6121. nodeList = doc.getElementsByTagName("head");
  6122. test.equal(nodeList.length, 1, 'Asize');
  6123. testNode = nodeList.item(0);
  6124. vdir = testNode.dir;
  6125. test.equal(vdir, "ltr", "dirLink");
  6126. test.done();
  6127. },
  6128. /**
  6129. *
  6130. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6131. Retrieve the dir attribute of the SUB element and examine its value.
  6132. * @author NIST
  6133. * @author Mary Brady
  6134. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6135. */
  6136. HTMLElement89: function(test) {
  6137. var success;
  6138. var nodeList;
  6139. var testNode;
  6140. var vdir;
  6141. var doc;
  6142. var docRef = null;
  6143. if (typeof(this.doc) != 'undefined') {
  6144. docRef = this.doc;
  6145. }
  6146. doc = load("element");
  6147. nodeList = doc.getElementsByTagName("sub");
  6148. test.equal(nodeList.length, 1, 'Asize');
  6149. testNode = nodeList.item(0);
  6150. vdir = testNode.dir;
  6151. test.equal(vdir, "ltr", "dirLink");
  6152. test.done();
  6153. },
  6154. /**
  6155. *
  6156. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6157. Retrieve the dir attribute of the SUP element and examine its value.
  6158. * @author NIST
  6159. * @author Mary Brady
  6160. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6161. */
  6162. HTMLElement90: function(test) {
  6163. var success;
  6164. var nodeList;
  6165. var testNode;
  6166. var vdir;
  6167. var doc;
  6168. var docRef = null;
  6169. if (typeof(this.doc) != 'undefined') {
  6170. docRef = this.doc;
  6171. }
  6172. doc = load("element");
  6173. nodeList = doc.getElementsByTagName("sup");
  6174. test.equal(nodeList.length, 1, 'Asize');
  6175. testNode = nodeList.item(0);
  6176. vdir = testNode.dir;
  6177. test.equal(vdir, "ltr", "dirLink");
  6178. test.done();
  6179. },
  6180. /**
  6181. *
  6182. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6183. Retrieve the dir attribute of the SPAN element and examine its value.
  6184. * @author NIST
  6185. * @author Mary Brady
  6186. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6187. */
  6188. HTMLElement91: function(test) {
  6189. var success;
  6190. var nodeList;
  6191. var testNode;
  6192. var vdir;
  6193. var doc;
  6194. var docRef = null;
  6195. if (typeof(this.doc) != 'undefined') {
  6196. docRef = this.doc;
  6197. }
  6198. doc = load("element");
  6199. nodeList = doc.getElementsByTagName("span");
  6200. test.equal(nodeList.length, 1, 'Asize');
  6201. testNode = nodeList.item(0);
  6202. vdir = testNode.dir;
  6203. test.equal(vdir, "ltr", "dirLink");
  6204. test.done();
  6205. },
  6206. /**
  6207. *
  6208. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6209. Retrieve the dir attribute of the BDO element and examine its value.
  6210. * @author NIST
  6211. * @author Mary Brady
  6212. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6213. */
  6214. HTMLElement92: function(test) {
  6215. var success;
  6216. var nodeList;
  6217. var testNode;
  6218. var vdir;
  6219. var doc;
  6220. var docRef = null;
  6221. if (typeof(this.doc) != 'undefined') {
  6222. docRef = this.doc;
  6223. }
  6224. doc = load("element");
  6225. nodeList = doc.getElementsByTagName("bdo");
  6226. test.equal(nodeList.length, 1, 'Asize');
  6227. testNode = nodeList.item(0);
  6228. vdir = testNode.dir;
  6229. test.equal(vdir, "ltr", "dirLink");
  6230. test.done();
  6231. },
  6232. /**
  6233. *
  6234. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6235. Retrieve the dir attribute of the TT element and examine its value.
  6236. * @author NIST
  6237. * @author Mary Brady
  6238. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6239. */
  6240. HTMLElement93: function(test) {
  6241. var success;
  6242. var nodeList;
  6243. var testNode;
  6244. var vdir;
  6245. var doc;
  6246. var docRef = null;
  6247. if (typeof(this.doc) != 'undefined') {
  6248. docRef = this.doc;
  6249. }
  6250. doc = load("element");
  6251. nodeList = doc.getElementsByTagName("tt");
  6252. test.equal(nodeList.length, 1, 'Asize');
  6253. testNode = nodeList.item(0);
  6254. vdir = testNode.dir;
  6255. test.equal(vdir, "ltr", "dirLink");
  6256. test.done();
  6257. },
  6258. /**
  6259. *
  6260. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6261. Retrieve the dir attribute of the I element and examine its value.
  6262. * @author NIST
  6263. * @author Mary Brady
  6264. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6265. */
  6266. HTMLElement94: function(test) {
  6267. var success;
  6268. var nodeList;
  6269. var testNode;
  6270. var vdir;
  6271. var doc;
  6272. var docRef = null;
  6273. if (typeof(this.doc) != 'undefined') {
  6274. docRef = this.doc;
  6275. }
  6276. doc = load("element");
  6277. nodeList = doc.getElementsByTagName("i");
  6278. test.equal(nodeList.length, 1, 'Asize');
  6279. testNode = nodeList.item(0);
  6280. vdir = testNode.dir;
  6281. test.equal(vdir, "ltr", "dirLink");
  6282. test.done();
  6283. },
  6284. /**
  6285. *
  6286. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6287. Retrieve the dir attribute of the B element and examine its value.
  6288. * @author NIST
  6289. * @author Mary Brady
  6290. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6291. */
  6292. HTMLElement95: function(test) {
  6293. var success;
  6294. var nodeList;
  6295. var testNode;
  6296. var vdir;
  6297. var doc;
  6298. var docRef = null;
  6299. if (typeof(this.doc) != 'undefined') {
  6300. docRef = this.doc;
  6301. }
  6302. doc = load("element");
  6303. nodeList = doc.getElementsByTagName("b");
  6304. test.equal(nodeList.length, 1, 'Asize');
  6305. testNode = nodeList.item(0);
  6306. vdir = testNode.dir;
  6307. test.equal(vdir, "ltr", "dirLink");
  6308. test.done();
  6309. },
  6310. /**
  6311. *
  6312. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6313. Retrieve the dir attribute of the U element and examine its value.
  6314. * @author NIST
  6315. * @author Mary Brady
  6316. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6317. */
  6318. HTMLElement96: function(test) {
  6319. var success;
  6320. var nodeList;
  6321. var testNode;
  6322. var vdir;
  6323. var doc;
  6324. var docRef = null;
  6325. if (typeof(this.doc) != 'undefined') {
  6326. docRef = this.doc;
  6327. }
  6328. doc = load("element");
  6329. nodeList = doc.getElementsByTagName("u");
  6330. test.equal(nodeList.length, 1, 'Asize');
  6331. testNode = nodeList.item(0);
  6332. vdir = testNode.dir;
  6333. test.equal(vdir, "ltr", "dirLink");
  6334. test.done();
  6335. },
  6336. /**
  6337. *
  6338. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6339. Retrieve the dir attribute of the S element and examine its value.
  6340. * @author NIST
  6341. * @author Mary Brady
  6342. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6343. */
  6344. HTMLElement97: function(test) {
  6345. var success;
  6346. var nodeList;
  6347. var testNode;
  6348. var vdir;
  6349. var doc;
  6350. var docRef = null;
  6351. if (typeof(this.doc) != 'undefined') {
  6352. docRef = this.doc;
  6353. }
  6354. doc = load("element");
  6355. nodeList = doc.getElementsByTagName("s");
  6356. test.equal(nodeList.length, 1, 'Asize');
  6357. testNode = nodeList.item(0);
  6358. vdir = testNode.dir;
  6359. test.equal(vdir, "ltr", "dirLink");
  6360. test.done();
  6361. },
  6362. /**
  6363. *
  6364. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6365. Retrieve the dir attribute of the STRIKE element and examine its value.
  6366. * @author NIST
  6367. * @author Mary Brady
  6368. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6369. */
  6370. HTMLElement98: function(test) {
  6371. var success;
  6372. var nodeList;
  6373. var testNode;
  6374. var vdir;
  6375. var doc;
  6376. var docRef = null;
  6377. if (typeof(this.doc) != 'undefined') {
  6378. docRef = this.doc;
  6379. }
  6380. doc = load("element");
  6381. nodeList = doc.getElementsByTagName("strike");
  6382. test.equal(nodeList.length, 1, 'Asize');
  6383. testNode = nodeList.item(0);
  6384. vdir = testNode.dir;
  6385. test.equal(vdir, "ltr", "dirLink");
  6386. test.done();
  6387. },
  6388. /**
  6389. *
  6390. The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
  6391. Retrieve the dir attribute of the BIG element and examine its value.
  6392. * @author NIST
  6393. * @author Mary Brady
  6394. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
  6395. */
  6396. HTMLElement99: function(test) {
  6397. var success;
  6398. var nodeList;
  6399. var testNode;
  6400. var vdir;
  6401. var doc;
  6402. var docRef = null;
  6403. if (typeof(this.doc) != 'undefined') {
  6404. docRef = this.doc;
  6405. }
  6406. doc = load("element");
  6407. nodeList = doc.getElementsByTagName("big");
  6408. test.equal(nodeList.length, 1, 'Asize');
  6409. testNode = nodeList.item(0);
  6410. vdir = testNode.dir;
  6411. test.equal(vdir, "ltr", "dirLink");
  6412. test.done();
  6413. },
  6414. /**
  6415. *
  6416. The form attribute returns the FORM element containing this control.
  6417. Retrieve the form attribute and examine its value.
  6418. * @author NIST
  6419. * @author Mary Brady
  6420. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75392630
  6421. */
  6422. HTMLFieldSetElement01: function(test) {
  6423. var success;
  6424. var nodeList;
  6425. var testNode;
  6426. var vform;
  6427. var fNode;
  6428. var doc;
  6429. var docRef = null;
  6430. if (typeof(this.doc) != 'undefined') {
  6431. docRef = this.doc;
  6432. }
  6433. doc = load("fieldset");
  6434. nodeList = doc.getElementsByTagName("fieldset");
  6435. test.equal(nodeList.length, 2, 'Asize');
  6436. testNode = nodeList.item(0);
  6437. fNode = testNode.form;
  6438. vform = fNode.id;
  6439. test.equal(vform, "form2", "formLink");
  6440. test.done();
  6441. },
  6442. /**
  6443. *
  6444. The form attribute returns null if control in not within the context of
  6445. form.
  6446. Retrieve the form attribute and examine its value.
  6447. * @author NIST
  6448. * @author Mary Brady
  6449. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75392630
  6450. */
  6451. HTMLFieldSetElement02: function(test) {
  6452. var success;
  6453. var nodeList;
  6454. var testNode;
  6455. var vform;
  6456. var doc;
  6457. var docRef = null;
  6458. if (typeof(this.doc) != 'undefined') {
  6459. docRef = this.doc;
  6460. }
  6461. doc = load("fieldset");
  6462. nodeList = doc.getElementsByTagName("fieldset");
  6463. test.equal(nodeList.length, 2, 'Asize');
  6464. testNode = nodeList.item(1);
  6465. vform = testNode.form;
  6466. test.equal(vform, null, 'vform should be null');
  6467. test.done();
  6468. },
  6469. /**
  6470. *
  6471. The color attribute specifies the font's color.
  6472. Retrieve the color attribute and examine its value.
  6473. * @author NIST
  6474. * @author Mary Brady
  6475. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53532975
  6476. */
  6477. HTMLFontElement01: function(test) {
  6478. var success;
  6479. var nodeList;
  6480. var testNode;
  6481. var vcolor;
  6482. var doc;
  6483. var docRef = null;
  6484. if (typeof(this.doc) != 'undefined') {
  6485. docRef = this.doc;
  6486. }
  6487. doc = load("font");
  6488. nodeList = doc.getElementsByTagName("font");
  6489. test.equal(nodeList.length, 1, 'Asize');
  6490. testNode = nodeList.item(0);
  6491. vcolor = testNode.color;
  6492. test.equal(vcolor, "#000000", "colorLink");
  6493. test.done();
  6494. },
  6495. /**
  6496. *
  6497. The face attribute specifies the font's face identifier.
  6498. Retrieve the face attribute and examine its value.
  6499. * @author NIST
  6500. * @author Mary Brady
  6501. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-55715655
  6502. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLFormElement-length
  6503. */
  6504. HTMLFontElement02: function(test) {
  6505. var success;
  6506. var nodeList;
  6507. var testNode;
  6508. var vface;
  6509. var doc;
  6510. var docRef = null;
  6511. if (typeof(this.doc) != 'undefined') {
  6512. docRef = this.doc;
  6513. }
  6514. doc = load("font");
  6515. nodeList = doc.getElementsByTagName("font");
  6516. test.equal(nodeList.length, 1, 'Asize');
  6517. testNode = nodeList.item(0);
  6518. vface = testNode.face;
  6519. test.equal(vface, "arial,helvetica", "faceLink");
  6520. test.done();
  6521. },
  6522. /**
  6523. *
  6524. The size attribute specifies the font's size.
  6525. Retrieve the size attribute and examine its value.
  6526. * @author NIST
  6527. * @author Mary Brady
  6528. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90127284
  6529. */
  6530. HTMLFontElement03: function(test) {
  6531. var success;
  6532. var nodeList;
  6533. var testNode;
  6534. var vsize;
  6535. var doc;
  6536. var docRef = null;
  6537. if (typeof(this.doc) != 'undefined') {
  6538. docRef = this.doc;
  6539. }
  6540. doc = load("font");
  6541. nodeList = doc.getElementsByTagName("font");
  6542. test.equal(nodeList.length, 1, 'Asize');
  6543. testNode = nodeList.item(0);
  6544. vsize = testNode.size;
  6545. test.equal(vsize, "4", "sizeLink");
  6546. test.done();
  6547. },
  6548. /**
  6549. *
  6550. The elements attribute specifies a collection of all control element
  6551. in the form.
  6552. Retrieve the elements attribute and examine its value.
  6553. * @author NIST
  6554. * @author Mary Brady
  6555. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479
  6556. */
  6557. HTMLFormElement01: function(test) {
  6558. var success;
  6559. var nodeList;
  6560. var elementnodeList;
  6561. var testNode;
  6562. var velements;
  6563. var doc;
  6564. var docRef = null;
  6565. if (typeof(this.doc) != 'undefined') {
  6566. docRef = this.doc;
  6567. }
  6568. doc = load("form");
  6569. nodeList = doc.getElementsByTagName("form");
  6570. test.equal(nodeList.length, 1, 'Asize');
  6571. testNode = nodeList.item(0);
  6572. elementnodeList = testNode.elements;
  6573. velements = elementnodeList.length;
  6574. test.equal(velements, 3, "elementsLink");
  6575. test.done();
  6576. },
  6577. /**
  6578. *
  6579. The length attribute specifies the number of form controls
  6580. in the form.
  6581. Retrieve the length attribute and examine its value.
  6582. * @author NIST
  6583. * @author Mary Brady
  6584. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40002357
  6585. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLFormElement-length
  6586. */
  6587. HTMLFormElement02: function(test) {
  6588. var success;
  6589. var nodeList;
  6590. var testNode;
  6591. var vlength;
  6592. var doc;
  6593. var docRef = null;
  6594. if (typeof(this.doc) != 'undefined') {
  6595. docRef = this.doc;
  6596. }
  6597. doc = load("form");
  6598. nodeList = doc.getElementsByTagName("form");
  6599. test.equal(nodeList.length, 1, 'Asize');
  6600. testNode = nodeList.item(0);
  6601. vlength = testNode.length;
  6602. test.equal(vlength, 3, "lengthLink");
  6603. test.done();
  6604. },
  6605. /**
  6606. *
  6607. The id(name) attribute specifies the name of the form.
  6608. Retrieve the id attribute and examine its value.
  6609. * @author NIST
  6610. * @author Mary Brady
  6611. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22051454
  6612. */
  6613. HTMLFormElement03: function(test) {
  6614. var success;
  6615. var nodeList;
  6616. var testNode;
  6617. var vname;
  6618. var doc;
  6619. var docRef = null;
  6620. if (typeof(this.doc) != 'undefined') {
  6621. docRef = this.doc;
  6622. }
  6623. doc = load("form");
  6624. nodeList = doc.getElementsByTagName("form");
  6625. test.equal(nodeList.length, 1, 'Asize');
  6626. testNode = nodeList.item(0);
  6627. vname = testNode.id;
  6628. test.equal(vname, "form1", "nameLink");
  6629. test.done();
  6630. },
  6631. /**
  6632. *
  6633. The acceptCharset attribute specifies the list of character sets
  6634. supported by the server.
  6635. Retrieve the acceptCharset attribute and examine its value.
  6636. * @author NIST
  6637. * @author Mary Brady
  6638. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19661795
  6639. */
  6640. HTMLFormElement04: function(test) {
  6641. var success;
  6642. var nodeList;
  6643. var testNode;
  6644. var vacceptcharset;
  6645. var doc;
  6646. var docRef = null;
  6647. if (typeof(this.doc) != 'undefined') {
  6648. docRef = this.doc;
  6649. }
  6650. doc = load("form");
  6651. nodeList = doc.getElementsByTagName("form");
  6652. test.equal(nodeList.length, 1, 'Asize');
  6653. testNode = nodeList.item(0);
  6654. vacceptcharset = testNode.acceptCharset;
  6655. test.equal(vacceptcharset, "US-ASCII", "acceptCharsetLink");
  6656. test.done();
  6657. },
  6658. /**
  6659. *
  6660. The action attribute specifies the server-side form handler.
  6661. Retrieve the action attribute and examine its value.
  6662. * @author NIST
  6663. * @author Mary Brady
  6664. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74049184
  6665. */
  6666. HTMLFormElement05: function(test) {
  6667. var success;
  6668. var nodeList;
  6669. var testNode;
  6670. var vaction;
  6671. var doc;
  6672. var docRef = null;
  6673. if (typeof(this.doc) != 'undefined') {
  6674. docRef = this.doc;
  6675. }
  6676. doc = load("form");
  6677. nodeList = doc.getElementsByTagName("form");
  6678. test.equal(nodeList.length, 1, 'Asize');
  6679. testNode = nodeList.item(0);
  6680. vaction = testNode.action;
  6681. test.equal(vaction, './files/getData.pl', 'actionLink');
  6682. test.done();
  6683. },
  6684. /**
  6685. *
  6686. The enctype attribute specifies the content of the submitted form.
  6687. Retrieve the enctype attribute and examine its value.
  6688. * @author NIST
  6689. * @author Mary Brady
  6690. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84227810
  6691. */
  6692. HTMLFormElement06: function(test) {
  6693. var success;
  6694. var nodeList;
  6695. var testNode;
  6696. var venctype;
  6697. var doc;
  6698. var docRef = null;
  6699. if (typeof(this.doc) != 'undefined') {
  6700. docRef = this.doc;
  6701. }
  6702. doc = load("form");
  6703. nodeList = doc.getElementsByTagName("form");
  6704. test.equal(nodeList.length, 1, 'Asize');
  6705. testNode = nodeList.item(0);
  6706. venctype = testNode.enctype;
  6707. test.equal(venctype, "application/x-www-form-urlencoded", "enctypeLink");
  6708. test.done();
  6709. },
  6710. /**
  6711. *
  6712. The method attribute specifies the HTTP method used to submit the form.
  6713. Retrieve the method attribute and examine its value.
  6714. * @author NIST
  6715. * @author Mary Brady
  6716. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82545539
  6717. */
  6718. HTMLFormElement07: function(test) {
  6719. var success;
  6720. var nodeList;
  6721. var testNode;
  6722. var vmethod;
  6723. var doc;
  6724. var docRef = null;
  6725. if (typeof(this.doc) != 'undefined') {
  6726. docRef = this.doc;
  6727. }
  6728. doc = load("form");
  6729. nodeList = doc.getElementsByTagName("form");
  6730. test.equal(nodeList.length, 1, 'Asize');
  6731. testNode = nodeList.item(0);
  6732. vmethod = testNode.method;
  6733. test.equal(vmethod, "post", "methodLink");
  6734. test.done();
  6735. },
  6736. /**
  6737. *
  6738. The target attribute specifies the frame to render the resource in.
  6739. Retrieve the target attribute and examine it's value.
  6740. * @author NIST
  6741. * @author Rick Rivello
  6742. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6512890
  6743. */
  6744. HTMLFormElement08: function(test) {
  6745. var success;
  6746. var nodeList;
  6747. var testNode;
  6748. var vtarget;
  6749. var doc;
  6750. var docRef = null;
  6751. if (typeof(this.doc) != 'undefined') {
  6752. docRef = this.doc;
  6753. }
  6754. doc = load("form2");
  6755. nodeList = doc.getElementsByTagName("form");
  6756. test.equal(nodeList.length, 1, 'Asize');
  6757. testNode = nodeList.item(0);
  6758. vtarget = testNode.target;
  6759. test.equal(vtarget, "dynamic", "targetLink");
  6760. test.done();
  6761. },
  6762. /**
  6763. *
  6764. HTMLFormElement.reset restores the forms default values.
  6765. * @author Curt Arnold
  6766. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76767677
  6767. */
  6768. HTMLFormElement09: function(test) {
  6769. var success;
  6770. var nodeList;
  6771. var testNode;
  6772. var doc;
  6773. var docRef = null;
  6774. if (typeof(this.doc) != 'undefined') {
  6775. docRef = this.doc;
  6776. }
  6777. doc = load("form2");
  6778. nodeList = doc.getElementsByTagName("form");
  6779. test.equal(nodeList.length, 1, 'Asize');
  6780. testNode = nodeList.item(0);
  6781. testNode.reset();
  6782. test.done();
  6783. },
  6784. /**
  6785. *
  6786. HTMLFormElement.submit submits the form.
  6787. * @author Curt Arnold
  6788. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76767676
  6789. */
  6790. HTMLFormElement10: function(test) {
  6791. var success;
  6792. var nodeList;
  6793. var testNode;
  6794. var doc;
  6795. var docRef = null;
  6796. if (typeof(this.doc) != 'undefined') {
  6797. docRef = this.doc;
  6798. }
  6799. doc = load("form3");
  6800. nodeList = doc.getElementsByTagName("form");
  6801. test.equal(nodeList.length, 1, 'Asize');
  6802. testNode = nodeList.item(0);
  6803. testNode.submit();
  6804. test.done();
  6805. },
  6806. /**
  6807. *
  6808. The frameBorder attribute specifies the request for frame borders.
  6809. (frameBorder=1 A border is drawn)
  6810. (FrameBorder=0 A border is not drawn)
  6811. Retrieve the frameBorder attribute of the first FRAME element and examine
  6812. it's value.
  6813. * @author NIST
  6814. * @author Rick Rivello
  6815. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11858633
  6816. */
  6817. HTMLFrameElement01: function(test) {
  6818. var success;
  6819. var nodeList;
  6820. var testNode;
  6821. var vframeborder;
  6822. var doc;
  6823. var docRef = null;
  6824. if (typeof(this.doc) != 'undefined') {
  6825. docRef = this.doc;
  6826. }
  6827. doc = load("frame");
  6828. nodeList = doc.getElementsByTagName("frame");
  6829. test.equal(nodeList.length, 2, 'Asize');
  6830. testNode = nodeList.item(0);
  6831. vframeborder = testNode.frameBorder;
  6832. test.equal(vframeborder, "1", "frameborderLink");
  6833. test.done();
  6834. },
  6835. /**
  6836. *
  6837. The longDesc attribute specifies a URI designating a long description
  6838. of this image or frame.
  6839. Retrieve the longDesc attribute of the first FRAME element and examine
  6840. its value.
  6841. * @author NIST
  6842. * @author Rick Rivello
  6843. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7836998
  6844. */
  6845. HTMLFrameElement02: function(test) {
  6846. var success;
  6847. var nodeList;
  6848. var testNode;
  6849. var vlongdesc;
  6850. var doc;
  6851. var docRef = null;
  6852. if (typeof(this.doc) != 'undefined') {
  6853. docRef = this.doc;
  6854. }
  6855. doc = load("frame");
  6856. nodeList = doc.getElementsByTagName("frame");
  6857. test.equal(nodeList.length, 2, 'Asize');
  6858. testNode = nodeList.item(0);
  6859. vlongdesc = testNode.longDesc;
  6860. test.equal(vlongdesc, "about:blank", "longdescLink");
  6861. test.done();
  6862. },
  6863. /**
  6864. *
  6865. The marginHeight attribute specifies the frame margin height, in pixels.
  6866. Retrieve the marginHeight attribute of the first FRAME element and examine
  6867. it's value.
  6868. * @author NIST
  6869. * @author Rick Rivello
  6870. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-55569778
  6871. */
  6872. HTMLFrameElement03: function(test) {
  6873. var success;
  6874. var nodeList;
  6875. var testNode;
  6876. var vmarginheight;
  6877. var doc;
  6878. var docRef = null;
  6879. if (typeof(this.doc) != 'undefined') {
  6880. docRef = this.doc;
  6881. }
  6882. doc = load("frame");
  6883. nodeList = doc.getElementsByTagName("frame");
  6884. test.equal(nodeList.length, 2, 'Asize');
  6885. testNode = nodeList.item(0);
  6886. vmarginheight = testNode.marginHeight;
  6887. test.equal(vmarginheight, "10", "marginheightLink");
  6888. test.done();
  6889. },
  6890. /**
  6891. *
  6892. The marginWidth attribute specifies the frame margin width, in pixels.
  6893. Retrieve the marginWidth attribute of the first FRAME element and examine
  6894. it's value.
  6895. * @author NIST
  6896. * @author Rick Rivello
  6897. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8369969
  6898. */
  6899. HTMLFrameElement04: function(test) {
  6900. var success;
  6901. var nodeList;
  6902. var testNode;
  6903. var vmarginwidth;
  6904. var doc;
  6905. var docRef = null;
  6906. if (typeof(this.doc) != 'undefined') {
  6907. docRef = this.doc;
  6908. }
  6909. doc = load("frame");
  6910. nodeList = doc.getElementsByTagName("frame");
  6911. test.equal(nodeList.length, 2, 'Asize');
  6912. testNode = nodeList.item(0);
  6913. vmarginwidth = testNode.marginWidth;
  6914. test.equal(vmarginwidth, "5", "marginwidthLink");
  6915. test.done();
  6916. },
  6917. /**
  6918. *
  6919. The name attribute specifies the frame name(object of the target
  6920. attribute).
  6921. Retrieve the name attribute of the first FRAME element and examine
  6922. it's value.
  6923. * @author NIST
  6924. * @author Rick Rivello
  6925. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91128709
  6926. */
  6927. HTMLFrameElement05: function(test) {
  6928. var success;
  6929. var nodeList;
  6930. var testNode;
  6931. var vname;
  6932. var doc;
  6933. var docRef = null;
  6934. if (typeof(this.doc) != 'undefined') {
  6935. docRef = this.doc;
  6936. }
  6937. doc = load("frame");
  6938. nodeList = doc.getElementsByTagName("frame");
  6939. test.equal(nodeList.length, 2, 'Asize');
  6940. testNode = nodeList.item(0);
  6941. vname = testNode.name;
  6942. test.equal(vname, "Frame1", "nameLink");
  6943. test.done();
  6944. },
  6945. /**
  6946. *
  6947. The noResize attribute specifies if the user can resize the frame. When
  6948. true, forbid user from resizing frame.
  6949. Retrieve the noResize attribute of the first FRAME element and examine
  6950. it's value.
  6951. * @author NIST
  6952. * @author Rick Rivello
  6953. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80766578
  6954. */
  6955. HTMLFrameElement06: function(test) {
  6956. var success;
  6957. var nodeList;
  6958. var testNode;
  6959. var vnoresize;
  6960. var doc;
  6961. var docRef = null;
  6962. if (typeof(this.doc) != 'undefined') {
  6963. docRef = this.doc;
  6964. }
  6965. doc = load("frame");
  6966. nodeList = doc.getElementsByTagName("frame");
  6967. test.equal(nodeList.length, 2, 'Asize');
  6968. testNode = nodeList.item(0);
  6969. vnoresize = testNode.noResize;
  6970. test.ok(vnoresize, 'noresizeLink');
  6971. test.done();
  6972. },
  6973. /**
  6974. *
  6975. The scrolling attribute specifies whether or not the frame should have
  6976. scrollbars.
  6977. Retrieve the scrolling attribute of the first FRAME element and examine
  6978. it's value.
  6979. * @author NIST
  6980. * @author Rick Rivello
  6981. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-45411424
  6982. */
  6983. HTMLFrameElement07: function(test) {
  6984. var success;
  6985. var nodeList;
  6986. var testNode;
  6987. var vscrolling;
  6988. var doc;
  6989. var docRef = null;
  6990. if (typeof(this.doc) != 'undefined') {
  6991. docRef = this.doc;
  6992. }
  6993. doc = load("frame");
  6994. nodeList = doc.getElementsByTagName("frame");
  6995. test.equal(nodeList.length, 2, 'Asize');
  6996. testNode = nodeList.item(0);
  6997. vscrolling = testNode.scrolling;
  6998. test.equal(vscrolling, "yes", "scrollingLink");
  6999. test.done();
  7000. },
  7001. /**
  7002. *
  7003. The src attribute specifies a URI designating the initial frame contents.
  7004. Retrieve the src attribute of the first FRAME element and examine
  7005. it's value.
  7006. * @author NIST
  7007. * @author Rick Rivello
  7008. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78799535
  7009. */
  7010. HTMLFrameElement08: function(test) {
  7011. var success;
  7012. var nodeList;
  7013. var testNode;
  7014. var vsrc;
  7015. var doc;
  7016. var docRef = null;
  7017. if (typeof(this.doc) != 'undefined') {
  7018. docRef = this.doc;
  7019. }
  7020. doc = load("frame");
  7021. nodeList = doc.getElementsByTagName("frame");
  7022. test.equal(nodeList.length, 2, 'Asize');
  7023. testNode = nodeList.item(0);
  7024. vsrc = testNode.src;
  7025. test.equal(vsrc, './img/right.png', 'srcLink');
  7026. test.done();
  7027. },
  7028. /**
  7029. *
  7030. The contentDocument attribute specifies the document this frame contains,
  7031. if there is any and it is available, or null otherwise.
  7032. Retrieve the contentDocument attribute of the first FRAME element
  7033. and examine its TITLE value.
  7034. * @author NIST
  7035. * @author Rick Rivello
  7036. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-78799536
  7037. */
  7038. HTMLFrameElement09: function(test) {
  7039. var success;
  7040. var testNode;
  7041. var cd;
  7042. var vtitle;
  7043. var doc;
  7044. var docRef = null;
  7045. if (typeof(this.doc) != 'undefined') {
  7046. docRef = this.doc;
  7047. }
  7048. doc = load("frame2");
  7049. doc.onload = function() {
  7050. testNode = doc.getElementById("Frame1");
  7051. cd = testNode.contentDocument;
  7052. vtitle = cd.title;
  7053. // Updated as per: http://lists.w3.org/Archives/Public/www-dom/2009JulSep/0026.html
  7054. test.equal(vtitle, "NIST DOM HTML Test - FRAME", "titleLink");
  7055. };
  7056. test.done();
  7057. },
  7058. /**
  7059. *
  7060. The cols attribute specifies the number of columns of frames in the
  7061. frameset.
  7062. Retrieve the cols attribute of the first FRAMESET element and examine
  7063. it's value.
  7064. * @author NIST
  7065. * @author Rick Rivello
  7066. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98869594
  7067. */
  7068. HTMLFrameSetElement01: function(test) {
  7069. var success;
  7070. var nodeList;
  7071. var testNode;
  7072. var vcols;
  7073. var doc;
  7074. var docRef = null;
  7075. if (typeof(this.doc) != 'undefined') {
  7076. docRef = this.doc;
  7077. }
  7078. doc = load("frameset");
  7079. nodeList = doc.getElementsByTagName("frameset");
  7080. test.equal(nodeList.length, 2, 'Asize');
  7081. testNode = nodeList.item(0);
  7082. vcols = testNode.cols;
  7083. test.equal(vcols, "20, 80", "colsLink");
  7084. test.done();
  7085. },
  7086. /**
  7087. *
  7088. The rows attribute specifies the number of rows of frames in the
  7089. frameset.
  7090. Retrieve the rows attribute of the second FRAMESET element and examine
  7091. it's value.
  7092. * @author NIST
  7093. * @author Rick Rivello
  7094. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19739247
  7095. */
  7096. HTMLFrameSetElement02: function(test) {
  7097. var success;
  7098. var nodeList;
  7099. var testNode;
  7100. var vrows;
  7101. var doc;
  7102. var docRef = null;
  7103. if (typeof(this.doc) != 'undefined') {
  7104. docRef = this.doc;
  7105. }
  7106. doc = load("frameset");
  7107. nodeList = doc.getElementsByTagName("frameset");
  7108. test.equal(nodeList.length, 2, 'Asize');
  7109. testNode = nodeList.item(1);
  7110. vrows = testNode.rows;
  7111. test.equal(vrows, "100, 200", "rowsLink");
  7112. test.done();
  7113. },
  7114. /**
  7115. *
  7116. The align attribute specifies the rule alignment on the page.
  7117. Retrieve the align attribute and examine its value.
  7118. * @author NIST
  7119. * @author Mary Brady
  7120. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15235012
  7121. */
  7122. HTMLHRElement01: function(test) {
  7123. var success;
  7124. var nodeList;
  7125. var testNode;
  7126. var valign;
  7127. var doc;
  7128. var docRef = null;
  7129. if (typeof(this.doc) != 'undefined') {
  7130. docRef = this.doc;
  7131. }
  7132. doc = load("hr");
  7133. nodeList = doc.getElementsByTagName("hr");
  7134. test.equal(nodeList.length, 1, 'Asize');
  7135. testNode = nodeList.item(0);
  7136. valign = testNode.align;
  7137. test.equal(valign, "center", "alignLink");
  7138. test.done();
  7139. },
  7140. /**
  7141. *
  7142. The noShade attribute specifies that the rule should be drawn as
  7143. a solid color.
  7144. Retrieve the noShade attribute and examine its value.
  7145. * @author NIST
  7146. * @author Mary Brady
  7147. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79813978
  7148. */
  7149. HTMLHRElement02: function(test) {
  7150. var success;
  7151. var nodeList;
  7152. var testNode;
  7153. var vnoshade;
  7154. var doc;
  7155. var docRef = null;
  7156. if (typeof(this.doc) != 'undefined') {
  7157. docRef = this.doc;
  7158. }
  7159. doc = load("hr");
  7160. nodeList = doc.getElementsByTagName("hr");
  7161. test.equal(nodeList.length, 1, 'Asize');
  7162. testNode = nodeList.item(0);
  7163. vnoshade = testNode.noShade;
  7164. test.ok(vnoshade, 'noShadeLink');
  7165. test.done();
  7166. },
  7167. /**
  7168. *
  7169. The size attribute specifies the height of the rule.
  7170. Retrieve the size attribute and examine its value.
  7171. * @author NIST
  7172. * @author Mary Brady
  7173. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77612587
  7174. */
  7175. HTMLHRElement03: function(test) {
  7176. var success;
  7177. var nodeList;
  7178. var testNode;
  7179. var vsize;
  7180. var doc;
  7181. var docRef = null;
  7182. if (typeof(this.doc) != 'undefined') {
  7183. docRef = this.doc;
  7184. }
  7185. doc = load("hr");
  7186. nodeList = doc.getElementsByTagName("hr");
  7187. test.equal(nodeList.length, 1, 'Asize');
  7188. testNode = nodeList.item(0);
  7189. vsize = testNode.size;
  7190. test.equal(vsize, "5", "sizeLink");
  7191. test.done();
  7192. },
  7193. /**
  7194. *
  7195. The width attribute specifies the width of the rule.
  7196. Retrieve the width attribute and examine its value.
  7197. * @author NIST
  7198. * @author Mary Brady
  7199. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87744198
  7200. */
  7201. HTMLHRElement04: function(test) {
  7202. var success;
  7203. var nodeList;
  7204. var testNode;
  7205. var vwidth;
  7206. var doc;
  7207. var docRef = null;
  7208. if (typeof(this.doc) != 'undefined') {
  7209. docRef = this.doc;
  7210. }
  7211. doc = load("hr");
  7212. nodeList = doc.getElementsByTagName("hr");
  7213. test.equal(nodeList.length, 1, 'Asize');
  7214. testNode = nodeList.item(0);
  7215. vwidth = testNode.width;
  7216. test.equal(vwidth, "400", "widthLink");
  7217. test.done();
  7218. },
  7219. /**
  7220. *
  7221. The profile attribute specifies a URI designating a metadata profile.
  7222. Retrieve the profile attribute and examine its value.
  7223. * @author NIST
  7224. * @author Mary Brady
  7225. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96921909
  7226. */
  7227. HTMLHeadElement01: function(test) {
  7228. var success;
  7229. var nodeList;
  7230. var testNode;
  7231. var vprofile;
  7232. var doc;
  7233. var docRef = null;
  7234. if (typeof(this.doc) != 'undefined') {
  7235. docRef = this.doc;
  7236. }
  7237. doc = load("head");
  7238. nodeList = doc.getElementsByTagName("head");
  7239. test.equal(nodeList.length, 1, 'Asize');
  7240. testNode = nodeList.item(0);
  7241. vprofile = testNode.profile;
  7242. test.equal(vprofile, 'http://www.w3.org/2004/07/profile', 'profileLink');
  7243. test.done();
  7244. },
  7245. /**
  7246. *
  7247. The align attribute specifies the horizontal text alignment(H1).
  7248. Retrieve the align attribute and examine its value.
  7249. * @author NIST
  7250. * @author Mary Brady
  7251. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
  7252. */
  7253. HTMLHeadingElement01: function(test) {
  7254. var success;
  7255. var nodeList;
  7256. var testNode;
  7257. var valign;
  7258. var doc;
  7259. var docRef = null;
  7260. if (typeof(this.doc) != 'undefined') {
  7261. docRef = this.doc;
  7262. }
  7263. doc = load("heading");
  7264. nodeList = doc.getElementsByTagName("h1");
  7265. test.equal(nodeList.length, 1, 'Asize');
  7266. testNode = nodeList.item(0);
  7267. valign = testNode.align;
  7268. test.equal(valign, "center", "alignLink");
  7269. test.done();
  7270. },
  7271. /**
  7272. *
  7273. The align attribute specifies the horizontal text alignment(H2).
  7274. Retrieve the align attribute and examine its value.
  7275. * @author NIST
  7276. * @author Mary Brady
  7277. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
  7278. */
  7279. HTMLHeadingElement02: function(test) {
  7280. var success;
  7281. var nodeList;
  7282. var testNode;
  7283. var valign;
  7284. var doc;
  7285. var docRef = null;
  7286. if (typeof(this.doc) != 'undefined') {
  7287. docRef = this.doc;
  7288. }
  7289. doc = load("heading");
  7290. nodeList = doc.getElementsByTagName("h2");
  7291. test.equal(nodeList.length, 1, 'Asize');
  7292. testNode = nodeList.item(0);
  7293. valign = testNode.align;
  7294. test.equal(valign, "left", "alignLink");
  7295. test.done();
  7296. },
  7297. /**
  7298. *
  7299. The align attribute specifies the horizontal text alignment(H3).
  7300. Retrieve the align attribute and examine its value.
  7301. * @author NIST
  7302. * @author Mary Brady
  7303. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
  7304. */
  7305. HTMLHeadingElement03: function(test) {
  7306. var success;
  7307. var nodeList;
  7308. var testNode;
  7309. var valign;
  7310. var doc;
  7311. var docRef = null;
  7312. if (typeof(this.doc) != 'undefined') {
  7313. docRef = this.doc;
  7314. }
  7315. doc = load("heading");
  7316. nodeList = doc.getElementsByTagName("h3");
  7317. test.equal(nodeList.length, 1, 'Asize');
  7318. testNode = nodeList.item(0);
  7319. valign = testNode.align;
  7320. test.equal(valign, "right", "alignLink");
  7321. test.done();
  7322. },
  7323. /**
  7324. *
  7325. The align attribute specifies the horizontal text alignment(H4).
  7326. Retrieve the align attribute and examine its value.
  7327. * @author NIST
  7328. * @author Mary Brady
  7329. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
  7330. */
  7331. HTMLHeadingElement04: function(test) {
  7332. var success;
  7333. var nodeList;
  7334. var testNode;
  7335. var valign;
  7336. var doc;
  7337. var docRef = null;
  7338. if (typeof(this.doc) != 'undefined') {
  7339. docRef = this.doc;
  7340. }
  7341. doc = load("heading");
  7342. nodeList = doc.getElementsByTagName("h4");
  7343. test.equal(nodeList.length, 1, 'Asize');
  7344. testNode = nodeList.item(0);
  7345. valign = testNode.align;
  7346. test.equal(valign, "justify", "alignLink");
  7347. test.done();
  7348. },
  7349. /**
  7350. *
  7351. The align attribute specifies the horizontal text alignment(H5).
  7352. Retrieve the align attribute and examine its value.
  7353. * @author NIST
  7354. * @author Mary Brady
  7355. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
  7356. */
  7357. HTMLHeadingElement05: function(test) {
  7358. var success;
  7359. var nodeList;
  7360. var testNode;
  7361. var valign;
  7362. var doc;
  7363. var docRef = null;
  7364. if (typeof(this.doc) != 'undefined') {
  7365. docRef = this.doc;
  7366. }
  7367. doc = load("heading");
  7368. nodeList = doc.getElementsByTagName("h5");
  7369. test.equal(nodeList.length, 1, 'Asize');
  7370. testNode = nodeList.item(0);
  7371. valign = testNode.align;
  7372. test.equal(valign, "center", "alignLink");
  7373. test.done();
  7374. },
  7375. /**
  7376. *
  7377. The align attribute specifies the horizontal text alignment(H6).
  7378. Retrieve the align attribute and examine its value.
  7379. * @author NIST
  7380. * @author Mary Brady
  7381. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
  7382. */
  7383. HTMLHeadingElement06: function(test) {
  7384. var success;
  7385. var nodeList;
  7386. var testNode;
  7387. var valign;
  7388. var doc;
  7389. var docRef = null;
  7390. if (typeof(this.doc) != 'undefined') {
  7391. docRef = this.doc;
  7392. }
  7393. doc = load("heading");
  7394. nodeList = doc.getElementsByTagName("h6");
  7395. test.equal(nodeList.length, 1, 'Asize');
  7396. testNode = nodeList.item(0);
  7397. valign = testNode.align;
  7398. test.equal(valign, "left", "alignLink");
  7399. test.done();
  7400. },
  7401. /**
  7402. *
  7403. The version attribute specifies version information about the document's
  7404. DTD.
  7405. Retrieve the version attribute and examine its value.
  7406. Test is only applicable to HTML, version attribute is not supported in XHTML.
  7407. * @author NIST
  7408. * @author Mary Brady
  7409. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9383775
  7410. */
  7411. HTMLHtmlElement01: function(test) {
  7412. var nodeList;
  7413. var testNode;
  7414. var vversion;
  7415. var doc;
  7416. doc = load("html");
  7417. nodeList = doc.getElementsByTagName("html");
  7418. test.equal(nodeList.length, 1, 'Asize');
  7419. testNode = nodeList.item(0);
  7420. vversion = testNode.version;
  7421. test.equal(vversion, "-//W3C//DTD HTML 4.01 Transitional//EN", "versionLink");
  7422. test.done();
  7423. },
  7424. /**
  7425. *
  7426. The align attribute aligns this object(vertically or horizontally with
  7427. respect to its surrounding text.
  7428. Retrieve the align attribute of the first IFRAME element and examine
  7429. it's value.
  7430. * @author NIST
  7431. * @author Rick Rivello
  7432. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11309947
  7433. */
  7434. HTMLIFrameElement01: function(test) {
  7435. var success;
  7436. var nodeList;
  7437. var testNode;
  7438. var valign;
  7439. var doc;
  7440. var docRef = null;
  7441. if (typeof(this.doc) != 'undefined') {
  7442. docRef = this.doc;
  7443. }
  7444. doc = load("iframe");
  7445. nodeList = doc.getElementsByTagName("iframe");
  7446. test.equal(nodeList.length, 1, 'Asize');
  7447. testNode = nodeList.item(0);
  7448. valign = testNode.align;
  7449. test.equal(valign, "top", "alignLink");
  7450. test.done();
  7451. },
  7452. /**
  7453. *
  7454. The frameBorder attribute specifies the request for frame borders.
  7455. (frameBorder=1 A border is drawn)
  7456. (FrameBorder=0 A border is not drawn)
  7457. Retrieve the frameBorder attribute of the first IFRAME element and examine
  7458. it's value.
  7459. * @author NIST
  7460. * @author Rick Rivello
  7461. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22463410
  7462. */
  7463. HTMLIFrameElement02: function(test) {
  7464. var success;
  7465. var nodeList;
  7466. var testNode;
  7467. var vframeborder;
  7468. var doc;
  7469. var docRef = null;
  7470. if (typeof(this.doc) != 'undefined') {
  7471. docRef = this.doc;
  7472. }
  7473. doc = load("iframe");
  7474. nodeList = doc.getElementsByTagName("iframe");
  7475. test.equal(nodeList.length, 1, 'Asize');
  7476. testNode = nodeList.item(0);
  7477. vframeborder = testNode.frameBorder;
  7478. test.equal(vframeborder, "1", "frameborderLink");
  7479. test.done();
  7480. },
  7481. /**
  7482. *
  7483. The height attribute specifies the frame height.
  7484. Retrieve the height attribute of the first IFRAME element and examine
  7485. it's value.
  7486. * @author NIST
  7487. * @author Rick Rivello
  7488. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-1678118
  7489. */
  7490. HTMLIFrameElement03: function(test) {
  7491. var success;
  7492. var nodeList;
  7493. var testNode;
  7494. var vheight;
  7495. var doc;
  7496. var docRef = null;
  7497. if (typeof(this.doc) != 'undefined') {
  7498. docRef = this.doc;
  7499. }
  7500. doc = load("iframe");
  7501. nodeList = doc.getElementsByTagName("iframe");
  7502. test.equal(nodeList.length, 1, 'Asize');
  7503. testNode = nodeList.item(0);
  7504. vheight = testNode.height;
  7505. test.equal(vheight, "50", "heightLink");
  7506. test.done();
  7507. },
  7508. /**
  7509. *
  7510. The longDesc attribute specifies a URI designating a long description
  7511. of this image or frame.
  7512. Retrieve the longDesc attribute of the first IFRAME element and examine
  7513. its value.
  7514. * @author NIST
  7515. * @author Rick Rivello
  7516. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70472105
  7517. */
  7518. HTMLIFrameElement04: function(test) {
  7519. var success;
  7520. var nodeList;
  7521. var testNode;
  7522. var vlongdesc;
  7523. var doc;
  7524. var docRef = null;
  7525. if (typeof(this.doc) != 'undefined') {
  7526. docRef = this.doc;
  7527. }
  7528. doc = load("iframe");
  7529. nodeList = doc.getElementsByTagName("iframe");
  7530. test.equal(nodeList.length, 1, 'Asize');
  7531. testNode = nodeList.item(0);
  7532. vlongdesc = testNode.longDesc;
  7533. test.equal(vlongdesc, "about:blank", "longdescLink");
  7534. test.done();
  7535. },
  7536. /**
  7537. *
  7538. The marginWidth attribute specifies the frame margin width, in pixels.
  7539. Retrieve the marginWidth attribute of the first FRAME element and examine
  7540. it's value.
  7541. * @author NIST
  7542. * @author Rick Rivello
  7543. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66486595
  7544. */
  7545. HTMLIFrameElement05: function(test) {
  7546. var success;
  7547. var nodeList;
  7548. var testNode;
  7549. var vmarginwidth;
  7550. var doc;
  7551. var docRef = null;
  7552. if (typeof(this.doc) != 'undefined') {
  7553. docRef = this.doc;
  7554. }
  7555. doc = load("iframe");
  7556. nodeList = doc.getElementsByTagName("iframe");
  7557. test.equal(nodeList.length, 1, 'Asize');
  7558. testNode = nodeList.item(0);
  7559. vmarginwidth = testNode.marginWidth;
  7560. test.equal(vmarginwidth, "5", "marginwidthLink");
  7561. test.done();
  7562. },
  7563. /**
  7564. *
  7565. The marginHeight attribute specifies the frame margin height, in pixels.
  7566. Retrieve the marginHeight attribute of the first IFRAME element and examine
  7567. it's value.
  7568. * @author NIST
  7569. * @author Rick Rivello
  7570. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91371294
  7571. */
  7572. HTMLIFrameElement06: function(test) {
  7573. var success;
  7574. var nodeList;
  7575. var testNode;
  7576. var vmarginheight;
  7577. var doc;
  7578. var docRef = null;
  7579. if (typeof(this.doc) != 'undefined') {
  7580. docRef = this.doc;
  7581. }
  7582. doc = load("iframe");
  7583. nodeList = doc.getElementsByTagName("iframe");
  7584. test.equal(nodeList.length, 1, 'Asize');
  7585. testNode = nodeList.item(0);
  7586. vmarginheight = testNode.marginHeight;
  7587. test.equal(vmarginheight, "10", "marginheightLink");
  7588. test.done();
  7589. },
  7590. /**
  7591. *
  7592. The name attribute specifies the frame name(object of the target
  7593. attribute).
  7594. Retrieve the name attribute of the first IFRAME element and examine
  7595. it's value.
  7596. * @author NIST
  7597. * @author Rick Rivello
  7598. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96819659
  7599. */
  7600. HTMLIFrameElement07: function(test) {
  7601. var success;
  7602. var nodeList;
  7603. var testNode;
  7604. var vname;
  7605. var doc;
  7606. var docRef = null;
  7607. if (typeof(this.doc) != 'undefined') {
  7608. docRef = this.doc;
  7609. }
  7610. doc = load("iframe");
  7611. nodeList = doc.getElementsByTagName("iframe");
  7612. test.equal(nodeList.length, 1, 'Asize');
  7613. testNode = nodeList.item(0);
  7614. vname = testNode.name;
  7615. test.equal(vname, "Iframe1", "nameLink");
  7616. test.done();
  7617. },
  7618. /**
  7619. *
  7620. The scrolling attribute specifies whether or not the frame should have
  7621. scrollbars.
  7622. Retrieve the scrolling attribute of the first FRAME element and examine
  7623. it's value.
  7624. * @author NIST
  7625. * @author Rick Rivello
  7626. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36369822
  7627. */
  7628. HTMLIFrameElement08: function(test) {
  7629. var success;
  7630. var nodeList;
  7631. var testNode;
  7632. var vscrolling;
  7633. var doc;
  7634. var docRef = null;
  7635. if (typeof(this.doc) != 'undefined') {
  7636. docRef = this.doc;
  7637. }
  7638. doc = load("iframe");
  7639. nodeList = doc.getElementsByTagName("iframe");
  7640. test.equal(nodeList.length, 1, 'Asize');
  7641. testNode = nodeList.item(0);
  7642. vscrolling = testNode.scrolling;
  7643. test.equal(vscrolling, "yes", "scrollingLink");
  7644. test.done();
  7645. },
  7646. /**
  7647. *
  7648. The src attribute specifies a URI designating the initial frame contents.
  7649. Retrieve the src attribute of the first FRAME element and examine
  7650. it's value.
  7651. * @author NIST
  7652. * @author Rick Rivello
  7653. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-43933957
  7654. */
  7655. HTMLIFrameElement09: function(test) {
  7656. var success;
  7657. var nodeList;
  7658. var testNode;
  7659. var vsrc;
  7660. var doc;
  7661. var docRef = null;
  7662. if (typeof(this.doc) != 'undefined') {
  7663. docRef = this.doc;
  7664. }
  7665. doc = load("iframe");
  7666. nodeList = doc.getElementsByTagName("iframe");
  7667. test.equal(nodeList.length, 1, 'Asize');
  7668. testNode = nodeList.item(0);
  7669. vsrc = testNode.src;
  7670. test.equal(vsrc, './img/right.png', 'srcLink');
  7671. test.done();
  7672. },
  7673. /**
  7674. *
  7675. The width attribute specifies the frame width.
  7676. Retrieve the width attribute of the first IFRAME element and examine
  7677. it's value.
  7678. * @author NIST
  7679. * @author Rick Rivello
  7680. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67133005
  7681. */
  7682. HTMLIFrameElement10: function(test) {
  7683. var success;
  7684. var nodeList;
  7685. var testNode;
  7686. var vwidth;
  7687. var doc;
  7688. var docRef = null;
  7689. if (typeof(this.doc) != 'undefined') {
  7690. docRef = this.doc;
  7691. }
  7692. doc = load("iframe");
  7693. nodeList = doc.getElementsByTagName("iframe");
  7694. test.equal(nodeList.length, 1, 'Asize');
  7695. testNode = nodeList.item(0);
  7696. vwidth = testNode.width;
  7697. test.equal(vwidth, "60", "widthLink");
  7698. test.done();
  7699. },
  7700. /**
  7701. *
  7702. Retrieve the contentDocument attribute of the second IFRAME element
  7703. and examine its title.
  7704. * @author NIST
  7705. * @author Rick Rivello
  7706. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-67133006
  7707. */
  7708. HTMLIFrameElement11: function(test) {
  7709. var success;
  7710. var testNode;
  7711. var cd;
  7712. var vtitle;
  7713. var doc;
  7714. var docRef = null;
  7715. if (typeof(this.doc) != 'undefined') {
  7716. docRef = this.doc;
  7717. }
  7718. doc = load("iframe2");
  7719. doc.onload = function() {
  7720. testNode = doc.getElementById("Iframe2");
  7721. cd = testNode.contentDocument;
  7722. vtitle = cd.title;
  7723. test.equal(vtitle, "NIST DOM HTML Test - FRAME", "titleLink");
  7724. };
  7725. test.done();
  7726. },
  7727. /**
  7728. *
  7729. The name attribute specifies the name of the element.
  7730. Retrieve the name attribute and examine its value.
  7731. * @author NIST
  7732. * @author Mary Brady
  7733. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47534097
  7734. */
  7735. HTMLImageElement01: function(test) {
  7736. var success;
  7737. var nodeList;
  7738. var testNode;
  7739. var vname;
  7740. var doc;
  7741. var docRef = null;
  7742. if (typeof(this.doc) != 'undefined') {
  7743. docRef = this.doc;
  7744. }
  7745. doc = load("img");
  7746. nodeList = doc.getElementsByTagName("img");
  7747. test.equal(nodeList.length, 1, 'Asize');
  7748. testNode = nodeList.item(0);
  7749. vname = testNode.name;
  7750. test.equal(vname, "IMAGE-1", "nameLink");
  7751. test.done();
  7752. },
  7753. /**
  7754. *
  7755. The align attribute aligns this object with respect to its surrounding
  7756. text.
  7757. Retrieve the align attribute and examine its value.
  7758. * @author NIST
  7759. * @author Mary Brady
  7760. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-3211094
  7761. */
  7762. HTMLImageElement02: function(test) {
  7763. var success;
  7764. var nodeList;
  7765. var testNode;
  7766. var valign;
  7767. var doc;
  7768. var docRef = null;
  7769. if (typeof(this.doc) != 'undefined') {
  7770. docRef = this.doc;
  7771. }
  7772. doc = load("img");
  7773. nodeList = doc.getElementsByTagName("img");
  7774. test.equal(nodeList.length, 1, 'Asize');
  7775. testNode = nodeList.item(0);
  7776. valign = testNode.align;
  7777. test.equal(valign, "middle", "alignLink");
  7778. test.done();
  7779. },
  7780. /**
  7781. *
  7782. The alt attribute specifies an alternative text for user agenst not
  7783. rendering the normal content of this element.
  7784. Retrieve the alt attribute and examine its value.
  7785. * @author NIST
  7786. * @author Mary Brady
  7787. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95636861
  7788. */
  7789. HTMLImageElement03: function(test) {
  7790. var success;
  7791. var nodeList;
  7792. var testNode;
  7793. var valt;
  7794. var doc;
  7795. var docRef = null;
  7796. if (typeof(this.doc) != 'undefined') {
  7797. docRef = this.doc;
  7798. }
  7799. doc = load("img");
  7800. nodeList = doc.getElementsByTagName("img");
  7801. test.equal(nodeList.length, 1, 'Asize');
  7802. testNode = nodeList.item(0);
  7803. valt = testNode.alt;
  7804. test.equal(valt, "DTS IMAGE LOGO", "altLink");
  7805. test.done();
  7806. },
  7807. /**
  7808. *
  7809. The border attribute specifies the width of the border around the image.
  7810. Retrieve the border attribute and examine its value.
  7811. * @author NIST
  7812. * @author Mary Brady
  7813. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-136671
  7814. */
  7815. HTMLImageElement04: function(test) {
  7816. var success;
  7817. var nodeList;
  7818. var testNode;
  7819. var vborder;
  7820. var doc;
  7821. var docRef = null;
  7822. if (typeof(this.doc) != 'undefined') {
  7823. docRef = this.doc;
  7824. }
  7825. doc = load("img");
  7826. nodeList = doc.getElementsByTagName("img");
  7827. test.equal(nodeList.length, 1, 'Asize');
  7828. testNode = nodeList.item(0);
  7829. vborder = testNode.border;
  7830. test.equal(vborder, "0", "borderLink");
  7831. test.done();
  7832. },
  7833. /**
  7834. *
  7835. The height attribute overrides the natural "height" of the image.
  7836. Retrieve the height attribute and examine it's value.
  7837. * @author NIST
  7838. * @author Mary Brady
  7839. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-91561496
  7840. */
  7841. HTMLImageElement05: function(test) {
  7842. var success;
  7843. var nodeList;
  7844. var testNode;
  7845. var vheight;
  7846. var doc;
  7847. var docRef = null;
  7848. if (typeof(this.doc) != 'undefined') {
  7849. docRef = this.doc;
  7850. }
  7851. doc = load("img");
  7852. nodeList = doc.getElementsByTagName("img");
  7853. test.equal(nodeList.length, 1, 'Asize');
  7854. testNode = nodeList.item(0);
  7855. vheight = testNode.height;
  7856. test.equal(vheight, 47, "heightLink");
  7857. test.done();
  7858. },
  7859. /**
  7860. *
  7861. The hspace attribute specifies the horizontal space to the left and
  7862. right of this image.
  7863. Retrieve the hspace attribute and examine it's value.
  7864. * @author NIST
  7865. * @author Mary Brady
  7866. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-53675471
  7867. */
  7868. HTMLImageElement06: function(test) {
  7869. var success;
  7870. var nodeList;
  7871. var testNode;
  7872. var vhspace;
  7873. var doc;
  7874. var docRef = null;
  7875. if (typeof(this.doc) != 'undefined') {
  7876. docRef = this.doc;
  7877. }
  7878. doc = load("img");
  7879. nodeList = doc.getElementsByTagName("img");
  7880. test.equal(nodeList.length, 1, 'Asize');
  7881. testNode = nodeList.item(0);
  7882. vhspace = testNode.hspace;
  7883. test.equal(vhspace, 4, "hspaceLink");
  7884. test.done();
  7885. },
  7886. /**
  7887. *
  7888. The isMap attribute indicates the use of server-side image map.
  7889. Retrieve the isMap attribute and examine its value.
  7890. * @author NIST
  7891. * @author Mary Brady
  7892. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58983880
  7893. */
  7894. HTMLImageElement07: function(test) {
  7895. var success;
  7896. var nodeList;
  7897. var testNode;
  7898. var vismap;
  7899. var doc;
  7900. var docRef = null;
  7901. if (typeof(this.doc) != 'undefined') {
  7902. docRef = this.doc;
  7903. }
  7904. doc = load("img");
  7905. nodeList = doc.getElementsByTagName("img");
  7906. test.equal(nodeList.length, 1, 'Asize');
  7907. testNode = nodeList.item(0);
  7908. vismap = testNode.isMap;
  7909. test.equal(vismap, false, 'vismap should be *false*');
  7910. test.done();
  7911. },
  7912. /**
  7913. *
  7914. The longDesc attribute contains an URI designating a long description
  7915. of this image or frame.
  7916. Retrieve the longDesc attribute and examine its value.
  7917. * @author NIST
  7918. * @author Mary Brady
  7919. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77376969
  7920. */
  7921. HTMLImageElement08: function(test) {
  7922. var success;
  7923. var nodeList;
  7924. var testNode;
  7925. var vlongdesc;
  7926. var doc;
  7927. var docRef = null;
  7928. if (typeof(this.doc) != 'undefined') {
  7929. docRef = this.doc;
  7930. }
  7931. doc = load("img");
  7932. nodeList = doc.getElementsByTagName("img");
  7933. test.equal(nodeList.length, 1, 'Asize');
  7934. testNode = nodeList.item(0);
  7935. vlongdesc = testNode.longDesc;
  7936. test.equal(vlongdesc, './files/desc.html', 'longDescLink');
  7937. test.done();
  7938. },
  7939. /**
  7940. *
  7941. The src attribute contains an URI designating the source of this image.
  7942. Retrieve the src attribute and examine its value.
  7943. * @author NIST
  7944. * @author Mary Brady
  7945. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87762984
  7946. */
  7947. HTMLImageElement09: function(test) {
  7948. var success;
  7949. var nodeList;
  7950. var testNode;
  7951. var vsrc;
  7952. var doc;
  7953. var docRef = null;
  7954. if (typeof(this.doc) != 'undefined') {
  7955. docRef = this.doc;
  7956. }
  7957. doc = load("img");
  7958. nodeList = doc.getElementsByTagName("img");
  7959. test.equal(nodeList.length, 1, 'Asize');
  7960. testNode = nodeList.item(0);
  7961. vsrc = testNode.src;
  7962. test.equal(vsrc, './pix/dts.gif', 'srcLink');
  7963. test.done();
  7964. },
  7965. /**
  7966. *
  7967. The useMap attribute specifies to use the client-side image map.
  7968. Retrieve the useMap attribute and examine its value.
  7969. * @author NIST
  7970. * @author Mary Brady
  7971. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35981181
  7972. */
  7973. HTMLImageElement10: function(test) {
  7974. var success;
  7975. var nodeList;
  7976. var testNode;
  7977. var vusemap;
  7978. var doc;
  7979. var docRef = null;
  7980. if (typeof(this.doc) != 'undefined') {
  7981. docRef = this.doc;
  7982. }
  7983. doc = load("img");
  7984. nodeList = doc.getElementsByTagName("img");
  7985. test.equal(nodeList.length, 1, 'Asize');
  7986. testNode = nodeList.item(0);
  7987. vusemap = testNode.useMap;
  7988. test.equal(vusemap, "#DTS-MAP", "useMapLink");
  7989. test.done();
  7990. },
  7991. /**
  7992. *
  7993. The vspace attribute specifies the vertical space above and below this
  7994. image.
  7995. Retrieve the vspace attribute and examine it's value.
  7996. * @author NIST
  7997. * @author Mary Brady
  7998. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-85374897
  7999. */
  8000. HTMLImageElement11: function(test) {
  8001. var success;
  8002. var nodeList;
  8003. var testNode;
  8004. var vvspace;
  8005. var doc;
  8006. var docRef = null;
  8007. if (typeof(this.doc) != 'undefined') {
  8008. docRef = this.doc;
  8009. }
  8010. doc = load("img");
  8011. nodeList = doc.getElementsByTagName("img");
  8012. test.equal(nodeList.length, 1, 'Asize');
  8013. testNode = nodeList.item(0);
  8014. vvspace = testNode.vspace;
  8015. test.equal(vvspace, 10, "vspaceLink");
  8016. test.done();
  8017. },
  8018. /**
  8019. *
  8020. The width attribute overrides the natural "width" of the image.
  8021. Retrieve the width attribute and examine it's value.
  8022. * @author NIST
  8023. * @author Mary Brady
  8024. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13839076
  8025. */
  8026. HTMLImageElement12: function(test) {
  8027. var success;
  8028. var nodeList;
  8029. var testNode;
  8030. var vwidth;
  8031. var doc;
  8032. var docRef = null;
  8033. if (typeof(this.doc) != 'undefined') {
  8034. docRef = this.doc;
  8035. }
  8036. doc = load("img");
  8037. nodeList = doc.getElementsByTagName("img");
  8038. test.equal(nodeList.length, 1, 'Asize');
  8039. testNode = nodeList.item(0);
  8040. vwidth = testNode.width;
  8041. test.equal(vwidth, 115, "widthLink");
  8042. test.done();
  8043. },
  8044. /**
  8045. *
  8046. The defaultValue attribute represents the HTML value of the attribute
  8047. when the type attribute has the value of "Text", "File" or "Password".
  8048. Retrieve the defaultValue attribute of the 1st INPUT element and examine
  8049. its value.
  8050. * @author NIST
  8051. * @author Mary Brady
  8052. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26091157
  8053. */
  8054. HTMLInputElement01: function(test) {
  8055. var success;
  8056. var nodeList;
  8057. var testNode;
  8058. var vdefaultvalue;
  8059. var doc;
  8060. var docRef = null;
  8061. if (typeof(this.doc) != 'undefined') {
  8062. docRef = this.doc;
  8063. }
  8064. doc = load("input");
  8065. nodeList = doc.getElementsByTagName("input");
  8066. test.equal(nodeList.length, 9, 'Asize');
  8067. testNode = nodeList.item(0);
  8068. vdefaultvalue = testNode.defaultValue;
  8069. test.equal(vdefaultvalue, "Password", "defaultValueLink");
  8070. test.done();
  8071. },
  8072. /**
  8073. *
  8074. The defaultChecked attribute represents the HTML checked attribute of
  8075. the element when the type attribute has the value checkbox or radio.
  8076. Retrieve the defaultValue attribute of the 4th INPUT element and
  8077. examine its value.
  8078. * @author NIST
  8079. * @author Mary Brady
  8080. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20509171
  8081. */
  8082. HTMLInputElement02: function(test) {
  8083. var success;
  8084. var nodeList;
  8085. var testNode;
  8086. var vdefaultchecked;
  8087. var doc;
  8088. var docRef = null;
  8089. if (typeof(this.doc) != 'undefined') {
  8090. docRef = this.doc;
  8091. }
  8092. doc = load("input");
  8093. nodeList = doc.getElementsByTagName("input");
  8094. test.equal(nodeList.length, 9, 'Asize');
  8095. testNode = nodeList.item(3);
  8096. vdefaultchecked = testNode.defaultChecked;
  8097. test.ok(vdefaultchecked, 'defaultCheckedLink');
  8098. test.done();
  8099. },
  8100. /**
  8101. *
  8102. The form attribute returns the FORM element containing this control.
  8103. Retrieve the form attribute of the 1st INPUT element and examine its value.
  8104. * @author NIST
  8105. * @author Mary Brady
  8106. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63239895
  8107. */
  8108. HTMLInputElement03: function(test) {
  8109. var success;
  8110. var nodeList;
  8111. var testNode;
  8112. var vform;
  8113. var fNode;
  8114. var doc;
  8115. var docRef = null;
  8116. if (typeof(this.doc) != 'undefined') {
  8117. docRef = this.doc;
  8118. }
  8119. doc = load("input");
  8120. nodeList = doc.getElementsByTagName("input");
  8121. test.equal(nodeList.length, 9, 'Asize');
  8122. testNode = nodeList.item(0);
  8123. fNode = testNode.form;
  8124. vform = fNode.id;
  8125. test.equal(vform, "form1", "formLink");
  8126. test.done();
  8127. },
  8128. /**
  8129. *
  8130. The accept attribute is a comma-seperated list of content types that
  8131. a server processing this form will handle correctly.
  8132. Retrieve the accept attribute of the 9th INPUT element and examine
  8133. its value.
  8134. * @author NIST
  8135. * @author Mary Brady
  8136. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15328520
  8137. */
  8138. HTMLInputElement04: function(test) {
  8139. var success;
  8140. var nodeList;
  8141. var testNode;
  8142. var vaccept;
  8143. var doc;
  8144. var docRef = null;
  8145. if (typeof(this.doc) != 'undefined') {
  8146. docRef = this.doc;
  8147. }
  8148. doc = load("input");
  8149. nodeList = doc.getElementsByTagName("input");
  8150. test.equal(nodeList.length, 9, 'Asize');
  8151. testNode = nodeList.item(8);
  8152. vaccept = testNode.accept;
  8153. test.equal(vaccept, 'GIF,JPEG', 'acceptLink');
  8154. test.done();
  8155. },
  8156. /**
  8157. *
  8158. The accessKey attribute is a single character access key to give access
  8159. to the form control.
  8160. Retrieve the accessKey attribute of the 2nd INPUT element and examine
  8161. its value.
  8162. * @author NIST
  8163. * @author Mary Brady
  8164. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59914154
  8165. */
  8166. HTMLInputElement05: function(test) {
  8167. var success;
  8168. var nodeList;
  8169. var testNode;
  8170. var vaccesskey;
  8171. var doc;
  8172. var docRef = null;
  8173. if (typeof(this.doc) != 'undefined') {
  8174. docRef = this.doc;
  8175. }
  8176. doc = load("input");
  8177. nodeList = doc.getElementsByTagName("input");
  8178. test.equal(nodeList.length, 9, 'Asize');
  8179. testNode = nodeList.item(1);
  8180. vaccesskey = testNode.accessKey;
  8181. test.equal(vaccesskey, "c", "accesskeyLink");
  8182. test.done();
  8183. },
  8184. /**
  8185. *
  8186. The align attribute aligns this object(vertically or horizontally)
  8187. with respect to the surrounding text.
  8188. Retrieve the align attribute of the 4th INPUT element and examine
  8189. its value.
  8190. * @author NIST
  8191. * @author Mary Brady
  8192. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96991182
  8193. */
  8194. HTMLInputElement06: function(test) {
  8195. var success;
  8196. var nodeList;
  8197. var testNode;
  8198. var valign;
  8199. var doc;
  8200. var docRef = null;
  8201. if (typeof(this.doc) != 'undefined') {
  8202. docRef = this.doc;
  8203. }
  8204. doc = load("input");
  8205. nodeList = doc.getElementsByTagName("input");
  8206. test.equal(nodeList.length, 9, 'Asize');
  8207. testNode = nodeList.item(3);
  8208. valign = testNode.align;
  8209. test.equal(valign.toLowerCase(), "bottom".toLowerCase(), "alignLink");
  8210. test.done();
  8211. },
  8212. /**
  8213. *
  8214. The alt attribute alternates text for user agents not rendering the
  8215. normal content of this element.
  8216. Retrieve the alt attribute of the 1st INPUT element and examine
  8217. its value.
  8218. * @author NIST
  8219. * @author Mary Brady
  8220. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92701314
  8221. */
  8222. HTMLInputElement07: function(test) {
  8223. var success;
  8224. var nodeList;
  8225. var testNode;
  8226. var valt;
  8227. var doc;
  8228. var docRef = null;
  8229. if (typeof(this.doc) != 'undefined') {
  8230. docRef = this.doc;
  8231. }
  8232. doc = load("input");
  8233. nodeList = doc.getElementsByTagName("input");
  8234. test.equal(nodeList.length, 9, 'Asize');
  8235. testNode = nodeList.item(0);
  8236. valt = testNode.alt;
  8237. test.equal(valt, "Password entry", "altLink");
  8238. test.done();
  8239. },
  8240. /**
  8241. *
  8242. The checked attribute represents the current state of the corresponding
  8243. form control when type has the value Radio or Checkbox.
  8244. Retrieve the accept attribute of the 3rd INPUT element and examine
  8245. its value.
  8246. * @author NIST
  8247. * @author Mary Brady
  8248. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30233917
  8249. */
  8250. HTMLInputElement08: function(test) {
  8251. var success;
  8252. var nodeList;
  8253. var testNode;
  8254. var vchecked;
  8255. var doc;
  8256. var docRef = null;
  8257. if (typeof(this.doc) != 'undefined') {
  8258. docRef = this.doc;
  8259. }
  8260. doc = load("input");
  8261. nodeList = doc.getElementsByTagName("input");
  8262. test.equal(nodeList.length, 9, 'Asize');
  8263. testNode = nodeList.item(2);
  8264. vchecked = testNode.checked;
  8265. test.ok(vchecked, 'checkedLink');
  8266. test.done();
  8267. },
  8268. /**
  8269. *
  8270. The disabled attribute has a TRUE value if it is explicitly set.
  8271. Retrieve the disabled attribute of the 7th INPUT element and examine
  8272. its value.
  8273. * @author NIST
  8274. * @author Mary Brady
  8275. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50886781
  8276. */
  8277. HTMLInputElement09: function(test) {
  8278. var success;
  8279. var nodeList;
  8280. var testNode;
  8281. var vdisabled;
  8282. var doc;
  8283. var docRef = null;
  8284. if (typeof(this.doc) != 'undefined') {
  8285. docRef = this.doc;
  8286. }
  8287. doc = load("input");
  8288. nodeList = doc.getElementsByTagName("input");
  8289. test.equal(nodeList.length, 9, 'Asize');
  8290. testNode = nodeList.item(6);
  8291. vdisabled = testNode.disabled;
  8292. test.ok(vdisabled, 'disabledLink');
  8293. test.done();
  8294. },
  8295. /**
  8296. *
  8297. The maxLength attribute is the maximum number of text characters for text
  8298. fields, when type has the value of Text or Password.
  8299. Retrieve the maxLenght attribute of the 1st INPUT element and examine
  8300. its value.
  8301. * @author NIST
  8302. * @author Mary Brady
  8303. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-54719353
  8304. */
  8305. HTMLInputElement10: function(test) {
  8306. var success;
  8307. var nodeList;
  8308. var testNode;
  8309. var vmaxlength;
  8310. var doc;
  8311. var docRef = null;
  8312. if (typeof(this.doc) != 'undefined') {
  8313. docRef = this.doc;
  8314. }
  8315. doc = load("input");
  8316. nodeList = doc.getElementsByTagName("input");
  8317. test.equal(nodeList.length, 9, 'Asize');
  8318. testNode = nodeList.item(0);
  8319. vmaxlength = testNode.maxLength;
  8320. test.equal(vmaxlength, 5, "maxlengthLink");
  8321. test.done();
  8322. },
  8323. /**
  8324. *
  8325. The name attribute is the form control or object name when submitted with
  8326. a form.
  8327. Retrieve the name attribute of the 1st INPUT element and examine
  8328. its value.
  8329. * @author NIST
  8330. * @author Mary Brady
  8331. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89658498
  8332. */
  8333. HTMLInputElement11: function(test) {
  8334. var success;
  8335. var nodeList;
  8336. var testNode;
  8337. var vname;
  8338. var doc;
  8339. var docRef = null;
  8340. if (typeof(this.doc) != 'undefined') {
  8341. docRef = this.doc;
  8342. }
  8343. doc = load("input");
  8344. nodeList = doc.getElementsByTagName("input");
  8345. test.equal(nodeList.length, 9, 'Asize');
  8346. testNode = nodeList.item(0);
  8347. vname = testNode.name;
  8348. test.equal(vname, "Password", "nameLink");
  8349. test.done();
  8350. },
  8351. /**
  8352. *
  8353. The readOnly attribute indicates that this control is read-only when
  8354. type has a value of text or password only.
  8355. Retrieve the readOnly attribute of the 1st INPUT element and examine
  8356. its value.
  8357. * @author NIST
  8358. * @author Mary Brady
  8359. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88461592
  8360. */
  8361. HTMLInputElement12: function(test) {
  8362. var success;
  8363. var nodeList;
  8364. var testNode;
  8365. var vreadonly;
  8366. var doc;
  8367. var docRef = null;
  8368. if (typeof(this.doc) != 'undefined') {
  8369. docRef = this.doc;
  8370. }
  8371. doc = load("input");
  8372. nodeList = doc.getElementsByTagName("input");
  8373. test.equal(nodeList.length, 9, 'Asize');
  8374. testNode = nodeList.item(0);
  8375. vreadonly = testNode.readOnly;
  8376. test.ok(vreadonly, 'readonlyLink');
  8377. test.done();
  8378. },
  8379. /**
  8380. *
  8381. The size attribute contains the size information. Its precise meaning
  8382. is specific to each type of field.
  8383. Retrieve the size attribute of the 1st INPUT element and examine
  8384. its value.
  8385. * @author NIST
  8386. * @author Mary Brady
  8387. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-79659438
  8388. */
  8389. HTMLInputElement13: function(test) {
  8390. var success;
  8391. var nodeList;
  8392. var testNode;
  8393. var vsize;
  8394. var doc;
  8395. var docRef = null;
  8396. if (typeof(this.doc) != 'undefined') {
  8397. docRef = this.doc;
  8398. }
  8399. doc = load("input");
  8400. nodeList = doc.getElementsByTagName("input");
  8401. test.equal(nodeList.length, 9, 'Asize');
  8402. testNode = nodeList.item(0);
  8403. vsize = testNode.size;
  8404. test.equal(vsize, 25, "size");
  8405. test.done();
  8406. },
  8407. /**
  8408. *
  8409. The src attribute specifies the location of the image to decorate the
  8410. graphical submit button when the type has the value Image.
  8411. Retrieve the src attribute of the 8th INPUT element and examine
  8412. its value.
  8413. * @author NIST
  8414. * @author Mary Brady
  8415. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-97320704
  8416. */
  8417. HTMLInputElement14: function(test) {
  8418. var success;
  8419. var nodeList;
  8420. var testNode;
  8421. var vsrc;
  8422. var doc;
  8423. var docRef = null;
  8424. if (typeof(this.doc) != 'undefined') {
  8425. docRef = this.doc;
  8426. }
  8427. doc = load("input");
  8428. nodeList = doc.getElementsByTagName("input");
  8429. test.equal(nodeList.length, 9, 'Asize');
  8430. testNode = nodeList.item(7);
  8431. vsrc = testNode.src;
  8432. test.equal(vsrc, './pix/submit.gif', 'srcLink');
  8433. test.done();
  8434. },
  8435. /**
  8436. *
  8437. The tabIndex attribute is an index that represents the elements position
  8438. in the tabbing order.
  8439. Retrieve the tabIndex attribute of the 3rd INPUT element and examine
  8440. its value.
  8441. * @author NIST
  8442. * @author Mary Brady
  8443. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62176355
  8444. */
  8445. HTMLInputElement15: function(test) {
  8446. var success;
  8447. var nodeList;
  8448. var testNode;
  8449. var vtabindex;
  8450. var doc;
  8451. var docRef = null;
  8452. if (typeof(this.doc) != 'undefined') {
  8453. docRef = this.doc;
  8454. }
  8455. doc = load("input");
  8456. nodeList = doc.getElementsByTagName("input");
  8457. test.equal(nodeList.length, 9, 'Asize');
  8458. testNode = nodeList.item(2);
  8459. vtabindex = testNode.tabIndex;
  8460. test.equal(vtabindex, 9, "tabindexLink");
  8461. test.done();
  8462. },
  8463. /**
  8464. *
  8465. The type attribute is the type of control created.
  8466. Retrieve the type attribute of the 1st INPUT element and examine
  8467. its value.
  8468. * @author NIST
  8469. * @author Mary Brady
  8470. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62883744
  8471. */
  8472. HTMLInputElement16: function(test) {
  8473. var success;
  8474. var nodeList;
  8475. var testNode;
  8476. var vtype;
  8477. var doc;
  8478. var docRef = null;
  8479. if (typeof(this.doc) != 'undefined') {
  8480. docRef = this.doc;
  8481. }
  8482. doc = load("input");
  8483. nodeList = doc.getElementsByTagName("input");
  8484. test.equal(nodeList.length, 9, 'Asize');
  8485. testNode = nodeList.item(0);
  8486. vtype = testNode.type;
  8487. test.equal(vtype, "password", "typeLink");
  8488. test.done();
  8489. },
  8490. /**
  8491. *
  8492. The useMap attribute specifies the use of the client-side image map.
  8493. Retrieve the useMap attribute of the 8th INPUT element and examine
  8494. its value.
  8495. * @author NIST
  8496. * @author Mary Brady
  8497. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32463706
  8498. */
  8499. HTMLInputElement17: function(test) {
  8500. var success;
  8501. var nodeList;
  8502. var testNode;
  8503. var vusemap;
  8504. var doc;
  8505. var docRef = null;
  8506. if (typeof(this.doc) != 'undefined') {
  8507. docRef = this.doc;
  8508. }
  8509. doc = load("input");
  8510. nodeList = doc.getElementsByTagName("input");
  8511. test.equal(nodeList.length, 9, 'Asize');
  8512. testNode = nodeList.item(7);
  8513. vusemap = testNode.useMap;
  8514. test.equal(vusemap, "#submit-map", "usemapLink");
  8515. test.done();
  8516. },
  8517. /**
  8518. *
  8519. The value attribute is the current content of the corresponding form
  8520. control when the type attribute has the value Text, File or Password.
  8521. Retrieve the value attribute of the 2nd INPUT element and examine
  8522. its value.
  8523. * @author NIST
  8524. * @author Mary Brady
  8525. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49531485
  8526. */
  8527. HTMLInputElement18: function(test) {
  8528. var success;
  8529. var nodeList;
  8530. var testNode;
  8531. var vvalue;
  8532. var doc;
  8533. var docRef = null;
  8534. if (typeof(this.doc) != 'undefined') {
  8535. docRef = this.doc;
  8536. }
  8537. doc = load("input");
  8538. nodeList = doc.getElementsByTagName("input");
  8539. test.equal(nodeList.length, 9, 'Asize');
  8540. testNode = nodeList.item(1);
  8541. vvalue = testNode.value;
  8542. test.equal(vvalue, "ReHire", "valueLink");
  8543. test.done();
  8544. },
  8545. /**
  8546. *
  8547. HTMLInputElement.blur should surrender input focus.
  8548. * @author Curt Arnold
  8549. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26838235
  8550. */
  8551. HTMLInputElement19: function(test) {
  8552. var success;
  8553. var nodeList;
  8554. var testNode;
  8555. var doc;
  8556. var docRef = null;
  8557. if (typeof(this.doc) != 'undefined') {
  8558. docRef = this.doc;
  8559. }
  8560. doc = load("input");
  8561. nodeList = doc.getElementsByTagName("input");
  8562. test.equal(nodeList.length, 9, 'Asize');
  8563. testNode = nodeList.item(1);
  8564. testNode.blur();
  8565. test.done();
  8566. },
  8567. /**
  8568. *
  8569. HTMLInputElement.focus should capture input focus.
  8570. * @author Curt Arnold
  8571. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65996295
  8572. */
  8573. HTMLInputElement20: function(test) {
  8574. var success;
  8575. var nodeList;
  8576. var testNode;
  8577. var doc;
  8578. var docRef = null;
  8579. if (typeof(this.doc) != 'undefined') {
  8580. docRef = this.doc;
  8581. }
  8582. doc = load("input");
  8583. nodeList = doc.getElementsByTagName("input");
  8584. test.equal(nodeList.length, 9, 'Asize');
  8585. testNode = nodeList.item(1);
  8586. testNode.focus();
  8587. test.done();
  8588. },
  8589. /**
  8590. *
  8591. HTMLInputElement.click should change the state of checked on a radio button.
  8592. * @author Curt Arnold
  8593. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-2651361
  8594. */
  8595. HTMLInputElement21: function(test) {
  8596. var success;
  8597. var nodeList;
  8598. var testNode;
  8599. var doc;
  8600. var checked;
  8601. var docRef = null;
  8602. if (typeof(this.doc) != 'undefined') {
  8603. docRef = this.doc;
  8604. }
  8605. doc = load("input");
  8606. nodeList = doc.getElementsByTagName("input");
  8607. test.equal(nodeList.length, 9, 'Asize');
  8608. testNode = nodeList.item(1);
  8609. checked = testNode.checked;
  8610. test.equal(checked, false, 'checked should be *false*');
  8611. testNode.click();
  8612. checked = testNode.checked;
  8613. test.ok(checked, 'checkedAfterClick');
  8614. test.done();
  8615. },
  8616. /**
  8617. *
  8618. HTMLInputElement.select should select the contents of a text area.
  8619. * @author Curt Arnold
  8620. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-34677168
  8621. */
  8622. HTMLInputElement22: function(test) {
  8623. var success;
  8624. var nodeList;
  8625. var testNode;
  8626. var doc;
  8627. var checked;
  8628. var docRef = null;
  8629. if (typeof(this.doc) != 'undefined') {
  8630. docRef = this.doc;
  8631. }
  8632. doc = load("input");
  8633. nodeList = doc.getElementsByTagName("input");
  8634. test.equal(nodeList.length, 9, 'Asize');
  8635. testNode = nodeList.item(0);
  8636. testNode.select();
  8637. test.done();
  8638. },
  8639. /**
  8640. *
  8641. The form attribute returns the FORM element containing this control.
  8642. Retrieve the form attribute and examine its value.
  8643. * @author NIST
  8644. * @author Mary Brady
  8645. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87069980
  8646. */
  8647. HTMLIsIndexElement01: function(test) {
  8648. var success;
  8649. var nodeList;
  8650. var testNode;
  8651. var vform;
  8652. var fNode;
  8653. var doc;
  8654. var prompt;
  8655. var docRef = null;
  8656. if (typeof(this.doc) != 'undefined') {
  8657. docRef = this.doc;
  8658. }
  8659. doc = load("isindex");
  8660. nodeList = doc.getElementsByTagName("isindex");
  8661. testNode = nodeList.item(0);
  8662. test.notEqual(testNode, null, 'testNode should not be null');
  8663. prompt = testNode.prompt;
  8664. test.equal(prompt, "New Employee: ", "IsIndex.Prompt");
  8665. fNode = testNode.form;
  8666. test.notEqual(fNode, null, 'fNode should not be null');
  8667. vform = fNode.id;
  8668. test.equal(vform, "form1", "formLink");
  8669. test.equal(nodeList.length, 2, 'Asize');
  8670. test.done();
  8671. },
  8672. /**
  8673. *
  8674. The form attribute returns null if control in not within the context of
  8675. form.
  8676. Retrieve the form attribute and examine its value.
  8677. * @author NIST
  8678. * @author Mary Brady
  8679. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87069980
  8680. */
  8681. HTMLIsIndexElement02: function(test) {
  8682. var success;
  8683. var nodeList;
  8684. var testNode;
  8685. var vform;
  8686. var doc;
  8687. var prompt;
  8688. var docRef = null;
  8689. if (typeof(this.doc) != 'undefined') {
  8690. docRef = this.doc;
  8691. }
  8692. doc = load("isindex");
  8693. nodeList = doc.getElementsByTagName("isindex");
  8694. testNode = nodeList.item(1);
  8695. test.notEqual(testNode, null, 'testNode should not be null');
  8696. prompt = testNode.prompt;
  8697. test.equal(prompt, "Old Employee: ", "IsIndex.Prompt");
  8698. vform = testNode.form;
  8699. test.equal(vform, null, 'vform should be null');
  8700. test.equal(nodeList.length, 2, 'Asize');
  8701. test.done();
  8702. },
  8703. /**
  8704. *
  8705. The prompt attribute specifies the prompt message.
  8706. Retrieve the prompt attribute of the 1st isindex element and examine
  8707. its value.
  8708. * @author NIST
  8709. * @author Mary Brady
  8710. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33589862
  8711. */
  8712. HTMLIsIndexElement03: function(test) {
  8713. var success;
  8714. var nodeList;
  8715. var testNode;
  8716. var vprompt;
  8717. var doc;
  8718. var docRef = null;
  8719. if (typeof(this.doc) != 'undefined') {
  8720. docRef = this.doc;
  8721. }
  8722. doc = load("isindex");
  8723. nodeList = doc.getElementsByTagName("isindex");
  8724. test.equal(nodeList.length, 2, 'Asize');
  8725. testNode = nodeList.item(0);
  8726. vprompt = testNode.prompt;
  8727. test.equal(vprompt, "New Employee: ", "promptLink");
  8728. test.done();
  8729. },
  8730. /**
  8731. *
  8732. The type attribute is a list item bullet style.
  8733. Retrieve the type attribute and examine its value.
  8734. * @author NIST
  8735. * @author Mary Brady
  8736. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52387668
  8737. */
  8738. HTMLLIElement01: function(test) {
  8739. var success;
  8740. var nodeList;
  8741. var testNode;
  8742. var vtype;
  8743. var doc;
  8744. var docRef = null;
  8745. if (typeof(this.doc) != 'undefined') {
  8746. docRef = this.doc;
  8747. }
  8748. doc = load("li");
  8749. nodeList = doc.getElementsByTagName("li");
  8750. test.equal(nodeList.length, 2, 'Asize');
  8751. testNode = nodeList.item(0);
  8752. vtype = testNode.type;
  8753. test.equal(vtype, "square", "typeLink");
  8754. test.done();
  8755. },
  8756. /**
  8757. *
  8758. The value attribute is a reset sequence number when used in OL.
  8759. Retrieve the value attribute and examine its value.
  8760. * @author NIST
  8761. * @author Mary Brady
  8762. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-45496263
  8763. */
  8764. HTMLLIElement02: function(test) {
  8765. var success;
  8766. var nodeList;
  8767. var testNode;
  8768. var vvalue;
  8769. var doc;
  8770. var docRef = null;
  8771. if (typeof(this.doc) != 'undefined') {
  8772. docRef = this.doc;
  8773. }
  8774. doc = load("li");
  8775. nodeList = doc.getElementsByTagName("li");
  8776. test.equal(nodeList.length, 2, 'Asize');
  8777. testNode = nodeList.item(0);
  8778. vvalue = testNode.value;
  8779. test.equal(vvalue, 2, "valueLink");
  8780. test.done();
  8781. },
  8782. /**
  8783. *
  8784. The form attribute returns the FORM element containing this control.
  8785. Retrieve the form attribute and examine its value.
  8786. * @author NIST
  8787. * @author Mary Brady
  8788. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32480901
  8789. */
  8790. HTMLLabelElement01: function(test) {
  8791. var success;
  8792. var nodeList;
  8793. var testNode;
  8794. var vform;
  8795. var fNode;
  8796. var doc;
  8797. var docRef = null;
  8798. if (typeof(this.doc) != 'undefined') {
  8799. docRef = this.doc;
  8800. }
  8801. doc = load("label");
  8802. nodeList = doc.getElementsByTagName("label");
  8803. test.equal(nodeList.length, 2, 'Asize');
  8804. testNode = nodeList.item(0);
  8805. fNode = testNode.form;
  8806. vform = fNode.id;
  8807. test.equal(vform, "form1", "formLink");
  8808. test.done();
  8809. },
  8810. /**
  8811. *
  8812. The form attribute returns null if control in not within the context of
  8813. form.
  8814. Retrieve the form attribute and examine its value.
  8815. * @author NIST
  8816. * @author Mary Brady
  8817. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32480901
  8818. */
  8819. HTMLLabelElement02: function(test) {
  8820. var success;
  8821. var nodeList;
  8822. var testNode;
  8823. var vform;
  8824. var doc;
  8825. var docRef = null;
  8826. if (typeof(this.doc) != 'undefined') {
  8827. docRef = this.doc;
  8828. }
  8829. doc = load("label");
  8830. nodeList = doc.getElementsByTagName("label");
  8831. test.equal(nodeList.length, 2, 'Asize');
  8832. testNode = nodeList.item(1);
  8833. vform = testNode.form;
  8834. test.equal(vform, null, 'vform should be null');
  8835. test.done();
  8836. },
  8837. /**
  8838. *
  8839. The accessKey attribute is a single character access key to give access
  8840. to the form control.
  8841. Retrieve the accessKey attribute and examine its value.
  8842. * @author NIST
  8843. * @author Mary Brady
  8844. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-43589892
  8845. */
  8846. HTMLLabelElement03: function(test) {
  8847. var success;
  8848. var nodeList;
  8849. var testNode;
  8850. var vaccesskey;
  8851. var doc;
  8852. var docRef = null;
  8853. if (typeof(this.doc) != 'undefined') {
  8854. docRef = this.doc;
  8855. }
  8856. doc = load("label");
  8857. nodeList = doc.getElementsByTagName("label");
  8858. test.equal(nodeList.length, 2, 'Asize');
  8859. testNode = nodeList.item(0);
  8860. vaccesskey = testNode.accessKey;
  8861. test.equal(vaccesskey, "b", "accesskeyLink");
  8862. test.done();
  8863. },
  8864. /**
  8865. *
  8866. The htmlFor attribute links this label with another form control by
  8867. id attribute.
  8868. Retrieve the htmlFor attribute of the first LABEL element
  8869. and examine its value.
  8870. * @author NIST
  8871. * @author Mary Brady
  8872. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96509813
  8873. */
  8874. HTMLLabelElement04: function(test) {
  8875. var success;
  8876. var nodeList;
  8877. var testNode;
  8878. var vhtmlfor;
  8879. var doc;
  8880. var docRef = null;
  8881. if (typeof(this.doc) != 'undefined') {
  8882. docRef = this.doc;
  8883. }
  8884. doc = load("label");
  8885. nodeList = doc.getElementsByTagName("label");
  8886. test.equal(nodeList.length, 2, 'Asize');
  8887. testNode = nodeList.item(0);
  8888. vhtmlfor = testNode.htmlFor;
  8889. test.equal(vhtmlfor, "input1", "htmlForLink");
  8890. test.done();
  8891. },
  8892. /**
  8893. *
  8894. The form attribute returns the FORM element containing this control.
  8895. Retrieve the form attribute from the first LEGEND element
  8896. and examine its value.
  8897. * @author NIST
  8898. * @author Mary Brady
  8899. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-29594519
  8900. */
  8901. HTMLLegendElement01: function(test) {
  8902. var success;
  8903. var nodeList;
  8904. var testNode;
  8905. var vform;
  8906. var fNode;
  8907. var doc;
  8908. var docRef = null;
  8909. if (typeof(this.doc) != 'undefined') {
  8910. docRef = this.doc;
  8911. }
  8912. doc = load("legend");
  8913. nodeList = doc.getElementsByTagName("legend");
  8914. test.equal(nodeList.length, 2, 'Asize');
  8915. testNode = nodeList.item(0);
  8916. fNode = testNode.form;
  8917. vform = fNode.id;
  8918. test.equal(vform, "form1", "formLink");
  8919. test.done();
  8920. },
  8921. /**
  8922. *
  8923. The form attribute returns null if control in not within the context of
  8924. form.
  8925. Retrieve the second ELEMENT and examine its form element.
  8926. * @author NIST
  8927. * @author Mary Brady
  8928. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-29594519
  8929. */
  8930. HTMLLegendElement02: function(test) {
  8931. var success;
  8932. var nodeList;
  8933. var testNode;
  8934. var vform;
  8935. var doc;
  8936. var docRef = null;
  8937. if (typeof(this.doc) != 'undefined') {
  8938. docRef = this.doc;
  8939. }
  8940. doc = load("legend");
  8941. nodeList = doc.getElementsByTagName("legend");
  8942. test.equal(nodeList.length, 2, 'Asize');
  8943. testNode = nodeList.item(1);
  8944. vform = testNode.form;
  8945. test.equal(vform, null, 'vform should be null');
  8946. test.done();
  8947. },
  8948. /**
  8949. *
  8950. The accessKey attribute is a single character access key to give access
  8951. to the form control.
  8952. Retrieve the accessKey attribute and examine its value.
  8953. * @author NIST
  8954. * @author Mary Brady
  8955. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11297832
  8956. */
  8957. HTMLLegendElement03: function(test) {
  8958. var success;
  8959. var nodeList;
  8960. var testNode;
  8961. var vaccesskey;
  8962. var doc;
  8963. var docRef = null;
  8964. if (typeof(this.doc) != 'undefined') {
  8965. docRef = this.doc;
  8966. }
  8967. doc = load("legend");
  8968. nodeList = doc.getElementsByTagName("legend");
  8969. test.equal(nodeList.length, 2, 'Asize');
  8970. testNode = nodeList.item(0);
  8971. vaccesskey = testNode.accessKey;
  8972. test.equal(vaccesskey, "b", "accesskeyLink");
  8973. test.done();
  8974. },
  8975. /**
  8976. *
  8977. The align attribute specifies the text alignment relative to FIELDSET.
  8978. Retrieve the align attribute and examine its value.
  8979. * @author NIST
  8980. * @author Mary Brady
  8981. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79538067
  8982. */
  8983. HTMLLegendElement04: function(test) {
  8984. var success;
  8985. var nodeList;
  8986. var testNode;
  8987. var valign;
  8988. var doc;
  8989. var docRef = null;
  8990. if (typeof(this.doc) != 'undefined') {
  8991. docRef = this.doc;
  8992. }
  8993. doc = load("legend");
  8994. nodeList = doc.getElementsByTagName("legend");
  8995. test.equal(nodeList.length, 2, 'Asize');
  8996. testNode = nodeList.item(0);
  8997. valign = testNode.align;
  8998. test.equal(valign, "top", "alignLink");
  8999. test.done();
  9000. },
  9001. /**
  9002. *
  9003. The disabled attribute enables/disables the link.
  9004. Retrieve the disabled attribute and examine its value.
  9005. * @author NIST
  9006. * @author Mary Brady
  9007. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87355129
  9008. */
  9009. HTMLLinkElement01: function(test) {
  9010. var success;
  9011. var nodeList;
  9012. var testNode;
  9013. var vdisabled;
  9014. var doc;
  9015. var docRef = null;
  9016. if (typeof(this.doc) != 'undefined') {
  9017. docRef = this.doc;
  9018. }
  9019. doc = load("link");
  9020. nodeList = doc.getElementsByTagName("link");
  9021. test.equal(nodeList.length, 2, 'Asize');
  9022. testNode = nodeList.item(1);
  9023. vdisabled = testNode.disabled;
  9024. test.equal(vdisabled, false, 'vdisabled should be *false*');
  9025. test.done();
  9026. },
  9027. /**
  9028. *
  9029. The charset attribute indicates the character encoding of the linked
  9030. resource.
  9031. Retrieve the charset attribute and examine its value.
  9032. * @author NIST
  9033. * @author Mary Brady
  9034. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63954491
  9035. */
  9036. HTMLLinkElement02: function(test) {
  9037. var success;
  9038. var nodeList;
  9039. var testNode;
  9040. var vcharset;
  9041. var doc;
  9042. var docRef = null;
  9043. if (typeof(this.doc) != 'undefined') {
  9044. docRef = this.doc;
  9045. }
  9046. doc = load("link");
  9047. nodeList = doc.getElementsByTagName("link");
  9048. test.equal(nodeList.length, 2, 'Asize');
  9049. testNode = nodeList.item(0);
  9050. vcharset = testNode.charset;
  9051. test.equal(vcharset, "Latin-1", "charsetLink");
  9052. test.done();
  9053. },
  9054. /**
  9055. *
  9056. The href attribute specifies the URI of the linked resource.
  9057. Retrieve the href attribute and examine its value.
  9058. * @author NIST
  9059. * @author Mary Brady
  9060. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33532588
  9061. */
  9062. HTMLLinkElement03: function(test) {
  9063. var success;
  9064. var nodeList;
  9065. var testNode;
  9066. var vhref;
  9067. var doc;
  9068. var docRef = null;
  9069. if (typeof(this.doc) != 'undefined') {
  9070. docRef = this.doc;
  9071. }
  9072. doc = load("link");
  9073. nodeList = doc.getElementsByTagName("link");
  9074. test.equal(nodeList.length, 2, 'Asize');
  9075. testNode = nodeList.item(0);
  9076. vhref = testNode.href;
  9077. test.equal(vhref, './files/glossary.html', 'hrefLink');
  9078. test.done();
  9079. },
  9080. /**
  9081. *
  9082. The hreflang attribute specifies the language code of the linked resource.
  9083. Retrieve the hreflang attribute and examine its value.
  9084. * @author NIST
  9085. * @author Mary Brady
  9086. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85145682
  9087. */
  9088. HTMLLinkElement04: function(test) {
  9089. var success;
  9090. var nodeList;
  9091. var testNode;
  9092. var vhreflang;
  9093. var doc;
  9094. var docRef = null;
  9095. if (typeof(this.doc) != 'undefined') {
  9096. docRef = this.doc;
  9097. }
  9098. doc = load("link");
  9099. nodeList = doc.getElementsByTagName("link");
  9100. test.equal(nodeList.length, 2, 'Asize');
  9101. testNode = nodeList.item(0);
  9102. vhreflang = testNode.hreflang;
  9103. test.equal(vhreflang, "en", "hreflangLink");
  9104. test.done();
  9105. },
  9106. /**
  9107. *
  9108. The media attribute specifies the targeted media.
  9109. Retrieve the media attribute and examine its value.
  9110. * @author NIST
  9111. * @author Mary Brady
  9112. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75813125
  9113. */
  9114. HTMLLinkElement05: function(test) {
  9115. var success;
  9116. var nodeList;
  9117. var testNode;
  9118. var vmedia;
  9119. var doc;
  9120. var docRef = null;
  9121. if (typeof(this.doc) != 'undefined') {
  9122. docRef = this.doc;
  9123. }
  9124. doc = load("link");
  9125. nodeList = doc.getElementsByTagName("link");
  9126. test.equal(nodeList.length, 2, 'Asize');
  9127. testNode = nodeList.item(0);
  9128. vmedia = testNode.media;
  9129. test.equal(vmedia, "screen", "mediaLink");
  9130. test.done();
  9131. },
  9132. /**
  9133. *
  9134. The rel attribute specifies the forward link type.
  9135. Retrieve the rel attribute and examine its value.
  9136. * @author NIST
  9137. * @author Mary Brady
  9138. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41369587
  9139. */
  9140. HTMLLinkElement06: function(test) {
  9141. var success;
  9142. var nodeList;
  9143. var testNode;
  9144. var vrel;
  9145. var doc;
  9146. var docRef = null;
  9147. if (typeof(this.doc) != 'undefined') {
  9148. docRef = this.doc;
  9149. }
  9150. doc = load("link");
  9151. nodeList = doc.getElementsByTagName("link");
  9152. test.equal(nodeList.length, 2, 'Asize');
  9153. testNode = nodeList.item(0);
  9154. vrel = testNode.rel;
  9155. test.equal(vrel, "Glossary", "relLink");
  9156. test.done();
  9157. },
  9158. /**
  9159. *
  9160. The rev attribute specifies the reverse link type.
  9161. Retrieve the rev attribute and examine its value.
  9162. * @author NIST
  9163. * @author Mary Brady
  9164. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40715461
  9165. */
  9166. HTMLLinkElement07: function(test) {
  9167. var success;
  9168. var nodeList;
  9169. var testNode;
  9170. var vrev;
  9171. var doc;
  9172. var docRef = null;
  9173. if (typeof(this.doc) != 'undefined') {
  9174. docRef = this.doc;
  9175. }
  9176. doc = load("link");
  9177. nodeList = doc.getElementsByTagName("link");
  9178. test.equal(nodeList.length, 2, 'Asize');
  9179. testNode = nodeList.item(1);
  9180. vrev = testNode.rev;
  9181. test.equal(vrev, "stylesheet", "revLink");
  9182. test.done();
  9183. },
  9184. /**
  9185. *
  9186. The type attribute specifies the advisory content type.
  9187. Retrieve the type attribute and examine its value.
  9188. * @author NIST
  9189. * @author Mary Brady
  9190. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32498296
  9191. */
  9192. HTMLLinkElement08: function(test) {
  9193. var success;
  9194. var nodeList;
  9195. var testNode;
  9196. var vtype;
  9197. var doc;
  9198. var docRef = null;
  9199. if (typeof(this.doc) != 'undefined') {
  9200. docRef = this.doc;
  9201. }
  9202. doc = load("link");
  9203. nodeList = doc.getElementsByTagName("link");
  9204. test.equal(nodeList.length, 2, 'Asize');
  9205. testNode = nodeList.item(0);
  9206. vtype = testNode.type;
  9207. test.equal(vtype, "text/html", "typeLink");
  9208. test.done();
  9209. },
  9210. /**
  9211. *
  9212. The target attribute specifies the frame to render the resource in.
  9213. Retrieve the target attribute and examine it's value.
  9214. * @author NIST
  9215. * @author Rick Rivello
  9216. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84183095
  9217. */
  9218. HTMLLinkElement09: function(test) {
  9219. var success;
  9220. var nodeList;
  9221. var testNode;
  9222. var vtarget;
  9223. var doc;
  9224. var docRef = null;
  9225. if (typeof(this.doc) != 'undefined') {
  9226. docRef = this.doc;
  9227. }
  9228. doc = load("link2");
  9229. nodeList = doc.getElementsByTagName("link");
  9230. test.equal(nodeList.length, 2, 'Asize');
  9231. testNode = nodeList.item(0);
  9232. vtarget = testNode.target;
  9233. test.equal(vtarget, "dynamic", "targetLink");
  9234. test.done();
  9235. },
  9236. /**
  9237. *
  9238. The areas attribute is a list of areas defined for the image map.
  9239. Retrieve the areas attribute and find the number of areas defined.
  9240. * @author NIST
  9241. * @author Mary Brady
  9242. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71838730
  9243. */
  9244. HTMLMapElement01: function(test) {
  9245. var success;
  9246. var nodeList;
  9247. var areasnodeList;
  9248. var testNode;
  9249. var vareas;
  9250. var doc;
  9251. var docRef = null;
  9252. if (typeof(this.doc) != 'undefined') {
  9253. docRef = this.doc;
  9254. }
  9255. doc = load("map");
  9256. nodeList = doc.getElementsByTagName("map");
  9257. test.equal(nodeList.length, 1, 'Asize');
  9258. testNode = nodeList.item(0);
  9259. areasnodeList = testNode.areas;
  9260. vareas = areasnodeList.length;
  9261. test.equal(vareas, 3, "areasLink");
  9262. test.done();
  9263. },
  9264. /**
  9265. *
  9266. The name attribute names the map(for use with usemap).
  9267. Retrieve the name attribute and examine its value.
  9268. * @author NIST
  9269. * @author Mary Brady
  9270. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52696514
  9271. */
  9272. HTMLMapElement02: function(test) {
  9273. var success;
  9274. var nodeList;
  9275. var testNode;
  9276. var vname;
  9277. var doc;
  9278. var docRef = null;
  9279. if (typeof(this.doc) != 'undefined') {
  9280. docRef = this.doc;
  9281. }
  9282. doc = load("map");
  9283. nodeList = doc.getElementsByTagName("map");
  9284. test.equal(nodeList.length, 1, 'Asize');
  9285. testNode = nodeList.item(0);
  9286. vname = testNode.name;
  9287. test.equal(vname, "mapid", "mapLink");
  9288. test.done();
  9289. },
  9290. /**
  9291. *
  9292. The compact attribute specifies a boolean value on whether to display
  9293. the list more compactly.
  9294. Retrieve the compact attribute and examine its value.
  9295. * @author NIST
  9296. * @author Mary Brady
  9297. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68436464
  9298. */
  9299. HTMLMenuElement01: function(test) {
  9300. var success;
  9301. var nodeList;
  9302. var testNode;
  9303. var vcompact;
  9304. var doc;
  9305. var docRef = null;
  9306. if (typeof(this.doc) != 'undefined') {
  9307. docRef = this.doc;
  9308. }
  9309. doc = load("menu");
  9310. nodeList = doc.getElementsByTagName("menu");
  9311. test.equal(nodeList.length, 1, 'Asize');
  9312. testNode = nodeList.item(0);
  9313. vcompact = testNode.compact;
  9314. test.ok(vcompact, 'compactLink');
  9315. test.done();
  9316. },
  9317. /**
  9318. *
  9319. The content attribute specifies associated information.
  9320. Retrieve the content attribute and examine its value.
  9321. * @author NIST
  9322. * @author Mary Brady
  9323. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87670826
  9324. */
  9325. HTMLMetaElement01: function(test) {
  9326. var success;
  9327. var nodeList;
  9328. var testNode;
  9329. var vcontent;
  9330. var doc;
  9331. var docRef = null;
  9332. if (typeof(this.doc) != 'undefined') {
  9333. docRef = this.doc;
  9334. }
  9335. doc = load("meta");
  9336. nodeList = doc.getElementsByTagName("meta");
  9337. test.equal(nodeList.length, 1, 'Asize');
  9338. testNode = nodeList.item(0);
  9339. vcontent = testNode.content;
  9340. test.equal(vcontent, "text/html; CHARSET=utf-8", "contentLink");
  9341. test.done();
  9342. },
  9343. /**
  9344. *
  9345. The httpEquiv attribute specifies an HTTP respnse header name.
  9346. Retrieve the httpEquiv attribute and examine its value.
  9347. * @author NIST
  9348. * @author Mary Brady
  9349. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77289449
  9350. */
  9351. HTMLMetaElement02: function(test) {
  9352. var success;
  9353. var nodeList;
  9354. var testNode;
  9355. var vhttpequiv;
  9356. var doc;
  9357. var docRef = null;
  9358. if (typeof(this.doc) != 'undefined') {
  9359. docRef = this.doc;
  9360. }
  9361. doc = load("meta");
  9362. nodeList = doc.getElementsByTagName("meta");
  9363. test.equal(nodeList.length, 1, 'Asize');
  9364. testNode = nodeList.item(0);
  9365. vhttpequiv = testNode.httpEquiv;
  9366. test.equal(vhttpequiv, "Content-Type", "httpEquivLink");
  9367. test.done();
  9368. },
  9369. /**
  9370. *
  9371. The name attribute specifies the meta information name.
  9372. Retrieve the name attribute and examine its value.
  9373. * @author NIST
  9374. * @author Mary Brady
  9375. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31037081
  9376. */
  9377. HTMLMetaElement03: function(test) {
  9378. var success;
  9379. var nodeList;
  9380. var testNode;
  9381. var vname;
  9382. var doc;
  9383. var docRef = null;
  9384. if (typeof(this.doc) != 'undefined') {
  9385. docRef = this.doc;
  9386. }
  9387. doc = load("meta");
  9388. nodeList = doc.getElementsByTagName("meta");
  9389. test.equal(nodeList.length, 1, 'Asize');
  9390. testNode = nodeList.item(0);
  9391. vname = testNode.name;
  9392. test.equal(vname, "Meta-Name", "nameLink");
  9393. test.done();
  9394. },
  9395. /**
  9396. *
  9397. The scheme attribute specifies a select form of content.
  9398. Retrieve the scheme attribute and examine its value.
  9399. * @author NIST
  9400. * @author Mary Brady
  9401. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35993789
  9402. */
  9403. HTMLMetaElement04: function(test) {
  9404. var success;
  9405. var nodeList;
  9406. var testNode;
  9407. var vscheme;
  9408. var doc;
  9409. var docRef = null;
  9410. if (typeof(this.doc) != 'undefined') {
  9411. docRef = this.doc;
  9412. }
  9413. doc = load("meta");
  9414. nodeList = doc.getElementsByTagName("meta");
  9415. test.equal(nodeList.length, 1, 'Asize');
  9416. testNode = nodeList.item(0);
  9417. vscheme = testNode.scheme;
  9418. test.equal(vscheme, "NIST", "schemeLink");
  9419. test.done();
  9420. },
  9421. /**
  9422. *
  9423. The cite attribute specifies an URI designating a document that describes
  9424. the reason for the change.
  9425. Retrieve the cite attribute of the INS element and examine its value.
  9426. * @author NIST
  9427. * @author Mary Brady
  9428. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75101708
  9429. */
  9430. HTMLModElement01: function(test) {
  9431. var success;
  9432. var nodeList;
  9433. var testNode;
  9434. var vcite;
  9435. var doc;
  9436. var docRef = null;
  9437. if (typeof(this.doc) != 'undefined') {
  9438. docRef = this.doc;
  9439. }
  9440. doc = load("mod");
  9441. nodeList = doc.getElementsByTagName("ins");
  9442. test.equal(nodeList.length, 1, 'Asize');
  9443. testNode = nodeList.item(0);
  9444. vcite = testNode.cite;
  9445. test.equal(vcite, './files/ins-reasons.html', 'citeLink');
  9446. test.done();
  9447. },
  9448. /**
  9449. *
  9450. The dateTime attribute specifies the date and time of the change.
  9451. Retrieve the dateTime attribute of the INS element and examine its value.
  9452. * @author NIST
  9453. * @author Mary Brady
  9454. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88432678
  9455. */
  9456. HTMLModElement02: function(test) {
  9457. var success;
  9458. var nodeList;
  9459. var testNode;
  9460. var vdatetime;
  9461. var doc;
  9462. var docRef = null;
  9463. if (typeof(this.doc) != 'undefined') {
  9464. docRef = this.doc;
  9465. }
  9466. doc = load("mod");
  9467. nodeList = doc.getElementsByTagName("ins");
  9468. test.equal(nodeList.length, 1, 'Asize');
  9469. testNode = nodeList.item(0);
  9470. vdatetime = testNode.dateTime;
  9471. test.equal(vdatetime, "January 1, 2002", "dateTimeLink");
  9472. test.done();
  9473. },
  9474. /**
  9475. *
  9476. The cite attribute specifies an URI designating a document that describes
  9477. the reason for the change.
  9478. Retrieve the cite attribute of the DEL element and examine its value.
  9479. * @author NIST
  9480. * @author Mary Brady
  9481. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75101708
  9482. */
  9483. HTMLModElement03: function(test) {
  9484. var success;
  9485. var nodeList;
  9486. var testNode;
  9487. var vcite;
  9488. var doc;
  9489. var docRef = null;
  9490. if (typeof(this.doc) != 'undefined') {
  9491. docRef = this.doc;
  9492. }
  9493. doc = load("mod");
  9494. nodeList = doc.getElementsByTagName("del");
  9495. test.equal(nodeList.length, 1, 'Asize');
  9496. testNode = nodeList.item(0);
  9497. vcite = testNode.cite;
  9498. test.equal(vcite, './files/del-reasons.html', 'citeLink');
  9499. test.done();
  9500. },
  9501. /**
  9502. *
  9503. The dateTime attribute specifies the date and time of the change.
  9504. Retrieve the dateTime attribute of the DEL element and examine its value.
  9505. * @author NIST
  9506. * @author Mary Brady
  9507. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88432678
  9508. */
  9509. HTMLModElement04: function(test) {
  9510. var success;
  9511. var nodeList;
  9512. var testNode;
  9513. var vdatetime;
  9514. var doc;
  9515. var docRef = null;
  9516. if (typeof(this.doc) != 'undefined') {
  9517. docRef = this.doc;
  9518. }
  9519. doc = load("mod");
  9520. nodeList = doc.getElementsByTagName("del");
  9521. test.equal(nodeList.length, 1, 'Asize');
  9522. testNode = nodeList.item(0);
  9523. vdatetime = testNode.dateTime;
  9524. test.equal(vdatetime, "January 2, 2002", "dateTimeLink");
  9525. test.done();
  9526. },
  9527. /**
  9528. *
  9529. The compact attribute specifies a boolean value on whether to display
  9530. the list more compactly.
  9531. Retrieve the compact attribute and examine its value.
  9532. * @author NIST
  9533. * @author Mary Brady
  9534. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76448506
  9535. */
  9536. HTMLOListElement01: function(test) {
  9537. var success;
  9538. var nodeList;
  9539. var testNode;
  9540. var vcompact;
  9541. var doc;
  9542. var docRef = null;
  9543. if (typeof(this.doc) != 'undefined') {
  9544. docRef = this.doc;
  9545. }
  9546. doc = load("olist");
  9547. nodeList = doc.getElementsByTagName("ol");
  9548. test.equal(nodeList.length, 1, 'Asize');
  9549. testNode = nodeList.item(0);
  9550. vcompact = testNode.compact;
  9551. test.ok(vcompact, 'compactLink');
  9552. test.done();
  9553. },
  9554. /**
  9555. *
  9556. The start attribute specifies the starting sequence number.
  9557. Retrieve the start attribute and examine its value.
  9558. * @author NIST
  9559. * @author Mary Brady
  9560. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14793325
  9561. */
  9562. HTMLOListElement02: function(test) {
  9563. var success;
  9564. var nodeList;
  9565. var testNode;
  9566. var vstart;
  9567. var doc;
  9568. var docRef = null;
  9569. if (typeof(this.doc) != 'undefined') {
  9570. docRef = this.doc;
  9571. }
  9572. doc = load("olist");
  9573. nodeList = doc.getElementsByTagName("ol");
  9574. test.equal(nodeList.length, 1, 'Asize');
  9575. testNode = nodeList.item(0);
  9576. vstart = testNode.start;
  9577. test.equal(vstart, 1, "startLink");
  9578. test.done();
  9579. },
  9580. /**
  9581. *
  9582. The type attribute specifies the numbering style.
  9583. Retrieve the type attribute and examine its value.
  9584. * @author NIST
  9585. * @author Mary Brady
  9586. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40971103
  9587. */
  9588. HTMLOListElement03: function(test) {
  9589. var success;
  9590. var nodeList;
  9591. var testNode;
  9592. var vtype;
  9593. var doc;
  9594. var docRef = null;
  9595. if (typeof(this.doc) != 'undefined') {
  9596. docRef = this.doc;
  9597. }
  9598. doc = load("olist");
  9599. nodeList = doc.getElementsByTagName("ol");
  9600. test.equal(nodeList.length, 1, 'Asize');
  9601. testNode = nodeList.item(0);
  9602. vtype = testNode.type;
  9603. test.equal(vtype, "1", "typeLink");
  9604. test.done();
  9605. },
  9606. /**
  9607. *
  9608. The form attribute returns the FORM element containing this control.
  9609. Retrieve the form attribute and examine its value.
  9610. * @author NIST
  9611. * @author Rick Rivello
  9612. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773
  9613. */
  9614. HTMLObjectElement01: function(test) {
  9615. var success;
  9616. var nodeList;
  9617. var testNode;
  9618. var fNode;
  9619. var vform;
  9620. var doc;
  9621. var docRef = null;
  9622. if (typeof(this.doc) != 'undefined') {
  9623. docRef = this.doc;
  9624. }
  9625. doc = load("object2");
  9626. nodeList = doc.getElementsByTagName("object");
  9627. test.equal(nodeList.length, 2, 'Asize');
  9628. testNode = nodeList.item(1);
  9629. fNode = testNode.form;
  9630. vform = fNode.id;
  9631. test.equal(vform, "object2", "idLink");
  9632. test.done();
  9633. },
  9634. /**
  9635. *
  9636. The code attribute specifies an Applet class file.
  9637. Retrieve the code attribute of the second OBJECT element and examine
  9638. its value. Should be "" since CODE is not a valid attribute for OBJECT.
  9639. * @author NIST
  9640. * @author Mary Brady
  9641. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75241146
  9642. */
  9643. HTMLObjectElement02: function(test) {
  9644. var success;
  9645. var nodeList;
  9646. var testNode;
  9647. var vcode;
  9648. var doc;
  9649. var docRef = null;
  9650. if (typeof(this.doc) != 'undefined') {
  9651. docRef = this.doc;
  9652. }
  9653. doc = load("object");
  9654. nodeList = doc.getElementsByTagName("object");
  9655. test.equal(nodeList.length, 2, 'Asize');
  9656. testNode = nodeList.item(1);
  9657. vcode = testNode.code;
  9658. test.equal(vcode, "", "codeLink");
  9659. test.done();
  9660. },
  9661. /**
  9662. *
  9663. The align attribute specifies the alignment of this object with respect
  9664. to its surrounding text.
  9665. Retrieve the align attribute of the first OBJECT element and examine
  9666. its value.
  9667. * @author NIST
  9668. * @author Mary Brady
  9669. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16962097
  9670. */
  9671. HTMLObjectElement03: function(test) {
  9672. var success;
  9673. var nodeList;
  9674. var testNode;
  9675. var valign;
  9676. var doc;
  9677. var docRef = null;
  9678. if (typeof(this.doc) != 'undefined') {
  9679. docRef = this.doc;
  9680. }
  9681. doc = load("object");
  9682. nodeList = doc.getElementsByTagName("object");
  9683. test.equal(nodeList.length, 2, 'Asize');
  9684. testNode = nodeList.item(0);
  9685. valign = testNode.align;
  9686. test.equal(valign, "middle", "alignLink");
  9687. test.done();
  9688. },
  9689. /**
  9690. *
  9691. The archive attribute specifies a space-separated list of archives.
  9692. Retrieve the archive attribute of the first OBJECT element and examine
  9693. its value.
  9694. * @author NIST
  9695. * @author Mary Brady
  9696. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47783837
  9697. */
  9698. HTMLObjectElement04: function(test) {
  9699. var success;
  9700. var nodeList;
  9701. var testNode;
  9702. var varchive;
  9703. var doc;
  9704. var docRef = null;
  9705. if (typeof(this.doc) != 'undefined') {
  9706. docRef = this.doc;
  9707. }
  9708. doc = load("object");
  9709. nodeList = doc.getElementsByTagName("object");
  9710. test.equal(nodeList.length, 2, 'Asize');
  9711. testNode = nodeList.item(0);
  9712. varchive = testNode.archive;
  9713. test.equal(varchive, "", "archiveLink");
  9714. test.done();
  9715. },
  9716. /**
  9717. *
  9718. The border attribute specifies the widht of the border around the object.
  9719. Retrieve the border attribute of the first OBJECT element and examine
  9720. its value.
  9721. * @author NIST
  9722. * @author Mary Brady
  9723. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82818419
  9724. */
  9725. HTMLObjectElement05: function(test) {
  9726. var success;
  9727. var nodeList;
  9728. var testNode;
  9729. var vborder;
  9730. var doc;
  9731. var docRef = null;
  9732. if (typeof(this.doc) != 'undefined') {
  9733. docRef = this.doc;
  9734. }
  9735. doc = load("object");
  9736. nodeList = doc.getElementsByTagName("object");
  9737. test.equal(nodeList.length, 2, 'Asize');
  9738. testNode = nodeList.item(0);
  9739. vborder = testNode.border;
  9740. test.equal(vborder, "0", "borderLink");
  9741. test.done();
  9742. },
  9743. /**
  9744. *
  9745. The codeBase attribute specifies the base URI for the classid, data and
  9746. archive attributes.
  9747. Retrieve the codeBase attribute of the first OBJECT element and examine
  9748. its value.
  9749. * @author NIST
  9750. * @author Mary Brady
  9751. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25709136
  9752. */
  9753. HTMLObjectElement06: function(test) {
  9754. var success;
  9755. var nodeList;
  9756. var testNode;
  9757. var vcodebase;
  9758. var doc;
  9759. var docRef = null;
  9760. if (typeof(this.doc) != 'undefined') {
  9761. docRef = this.doc;
  9762. }
  9763. doc = load("object");
  9764. nodeList = doc.getElementsByTagName("object");
  9765. test.equal(nodeList.length, 2, 'Asize');
  9766. testNode = nodeList.item(0);
  9767. vcodebase = testNode.codeBase;
  9768. // assertURIEquals("codebaseLink",null,"//xw2k.sdct.itl.nist.gov/brady/dom/",null,null,null,null,null,null,vcodebase);
  9769. test.equal(vcodebase, 'http://xw2k.sdct.itl.nist.gov/brady/dom/', 'codebaseLink');
  9770. test.done();
  9771. },
  9772. /**
  9773. *
  9774. The codeType attribute specifies the data downloaded via the classid
  9775. attribute.
  9776. Retrieve the codeType attribute of the second OBJECT element and examine
  9777. its value.
  9778. * @author NIST
  9779. * @author Mary Brady
  9780. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19945008
  9781. */
  9782. HTMLObjectElement07: function(test) {
  9783. var success;
  9784. var nodeList;
  9785. var testNode;
  9786. var vcodetype;
  9787. var doc;
  9788. var docRef = null;
  9789. if (typeof(this.doc) != 'undefined') {
  9790. docRef = this.doc;
  9791. }
  9792. doc = load("object");
  9793. nodeList = doc.getElementsByTagName("object");
  9794. test.equal(nodeList.length, 2, 'Asize');
  9795. testNode = nodeList.item(1);
  9796. vcodetype = testNode.codeType;
  9797. test.equal(vcodetype, "image/gif", "codetypeLink");
  9798. test.done();
  9799. },
  9800. /**
  9801. *
  9802. The data attribute specifies the URI of the location of the objects data.
  9803. Retrieve the data attribute of the first OBJECT element and examine
  9804. its value.
  9805. * @author NIST
  9806. * @author Mary Brady
  9807. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-81766986
  9808. */
  9809. HTMLObjectElement08: function(test) {
  9810. var success;
  9811. var nodeList;
  9812. var testNode;
  9813. var vdata;
  9814. var doc;
  9815. var docRef = null;
  9816. if (typeof(this.doc) != 'undefined') {
  9817. docRef = this.doc;
  9818. }
  9819. doc = load("object");
  9820. nodeList = doc.getElementsByTagName("object");
  9821. test.equal(nodeList.length, 2, 'Asize');
  9822. testNode = nodeList.item(0);
  9823. vdata = testNode.data;
  9824. test.equal(vdata, './pix/logo.gif', 'dataLink');
  9825. test.done();
  9826. },
  9827. /**
  9828. *
  9829. The declare attribute specifies this object should be declared only and
  9830. no instance of it should be created.
  9831. Retrieve the declare attribute of the second OBJECT element and examine
  9832. its value.
  9833. * @author NIST
  9834. * @author Mary Brady
  9835. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-942770
  9836. */
  9837. HTMLObjectElement09: function(test) {
  9838. var success;
  9839. var nodeList;
  9840. var testNode;
  9841. var vdeclare;
  9842. var doc;
  9843. var docRef = null;
  9844. if (typeof(this.doc) != 'undefined') {
  9845. docRef = this.doc;
  9846. }
  9847. doc = load("object");
  9848. nodeList = doc.getElementsByTagName("object");
  9849. test.equal(nodeList.length, 2, 'Asize');
  9850. testNode = nodeList.item(1);
  9851. vdeclare = testNode.declare;
  9852. test.ok(vdeclare, 'declareLink');
  9853. test.done();
  9854. },
  9855. /**
  9856. *
  9857. The height attribute overrides the value of the actual height of the
  9858. object.
  9859. Retrieve the height attribute of the first OBJECT element and examine
  9860. its value.
  9861. * @author NIST
  9862. * @author Mary Brady
  9863. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88925838
  9864. */
  9865. HTMLObjectElement10: function(test) {
  9866. var success;
  9867. var nodeList;
  9868. var testNode;
  9869. var vheight;
  9870. var doc;
  9871. var docRef = null;
  9872. if (typeof(this.doc) != 'undefined') {
  9873. docRef = this.doc;
  9874. }
  9875. doc = load("object");
  9876. nodeList = doc.getElementsByTagName("object");
  9877. test.equal(nodeList.length, 2, 'Asize');
  9878. testNode = nodeList.item(0);
  9879. vheight = testNode.height;
  9880. test.equal(vheight, "60", "heightLink");
  9881. test.done();
  9882. },
  9883. /**
  9884. *
  9885. The hspace attribute specifies the horizontal space to the left and right
  9886. of this image, applet or object.
  9887. Retrieve the hspace attribute of the first OBJECT element and examine
  9888. it's value.
  9889. * @author NIST
  9890. * @author Mary Brady
  9891. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-17085376
  9892. */
  9893. HTMLObjectElement11: function(test) {
  9894. var success;
  9895. var nodeList;
  9896. var testNode;
  9897. var vhspace;
  9898. var doc;
  9899. var docRef = null;
  9900. if (typeof(this.doc) != 'undefined') {
  9901. docRef = this.doc;
  9902. }
  9903. doc = load("object");
  9904. nodeList = doc.getElementsByTagName("object");
  9905. test.equal(nodeList.length, 2, 'Asize');
  9906. testNode = nodeList.item(0);
  9907. vhspace = testNode.hspace;
  9908. test.equal(vhspace, 0, "hspaceLink");
  9909. test.done();
  9910. },
  9911. /**
  9912. *
  9913. The standby attribute specifies a message to render while loading the
  9914. object.
  9915. Retrieve the standby attribute of the first OBJECT element and examine
  9916. its value.
  9917. * @author NIST
  9918. * @author Mary Brady
  9919. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25039673
  9920. */
  9921. HTMLObjectElement12: function(test) {
  9922. var success;
  9923. var nodeList;
  9924. var testNode;
  9925. var vstandby;
  9926. var doc;
  9927. var docRef = null;
  9928. if (typeof(this.doc) != 'undefined') {
  9929. docRef = this.doc;
  9930. }
  9931. doc = load("object");
  9932. nodeList = doc.getElementsByTagName("object");
  9933. test.equal(nodeList.length, 2, 'Asize');
  9934. testNode = nodeList.item(0);
  9935. vstandby = testNode.standby;
  9936. test.equal(vstandby, "Loading Image ...", "alignLink");
  9937. test.done();
  9938. },
  9939. /**
  9940. *
  9941. The tabIndex attribute specifies the elements position in the tabbing
  9942. order.
  9943. Retrieve the tabIndex attribute of the first OBJECT element and examine
  9944. its value.
  9945. * @author NIST
  9946. * @author Mary Brady
  9947. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27083787
  9948. */
  9949. HTMLObjectElement13: function(test) {
  9950. var success;
  9951. var nodeList;
  9952. var testNode;
  9953. var vtabindex;
  9954. var doc;
  9955. var docRef = null;
  9956. if (typeof(this.doc) != 'undefined') {
  9957. docRef = this.doc;
  9958. }
  9959. doc = load("object");
  9960. nodeList = doc.getElementsByTagName("object");
  9961. test.equal(nodeList.length, 2, 'Asize');
  9962. testNode = nodeList.item(0);
  9963. vtabindex = testNode.tabIndex;
  9964. test.equal(vtabindex, 0, "tabIndexLink");
  9965. test.done();
  9966. },
  9967. /**
  9968. *
  9969. The type attribute specifies the content type for data downloaded via
  9970. the data attribute.
  9971. Retrieve the type attribute of the first OBJECT element and examine
  9972. its value.
  9973. * @author NIST
  9974. * @author Mary Brady
  9975. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91665621
  9976. */
  9977. HTMLObjectElement14: function(test) {
  9978. var success;
  9979. var nodeList;
  9980. var testNode;
  9981. var vtype;
  9982. var doc;
  9983. var docRef = null;
  9984. if (typeof(this.doc) != 'undefined') {
  9985. docRef = this.doc;
  9986. }
  9987. doc = load("object");
  9988. nodeList = doc.getElementsByTagName("object");
  9989. test.equal(nodeList.length, 2, 'Asize');
  9990. testNode = nodeList.item(0);
  9991. vtype = testNode.type;
  9992. test.equal(vtype, "image/gif", "typeLink");
  9993. test.done();
  9994. },
  9995. /**
  9996. *
  9997. The useMap attribute specifies the used client-side image map.
  9998. Retrieve the useMap attribute of the first OBJECT element and examine
  9999. its value.
  10000. * @author NIST
  10001. * @author Mary Brady
  10002. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6649772
  10003. */
  10004. HTMLObjectElement15: function(test) {
  10005. var success;
  10006. var nodeList;
  10007. var testNode;
  10008. var vusemap;
  10009. var doc;
  10010. var docRef = null;
  10011. if (typeof(this.doc) != 'undefined') {
  10012. docRef = this.doc;
  10013. }
  10014. doc = load("object");
  10015. nodeList = doc.getElementsByTagName("object");
  10016. test.equal(nodeList.length, 2, 'Asize');
  10017. testNode = nodeList.item(0);
  10018. vusemap = testNode.useMap;
  10019. test.equal(vusemap, "#DivLogo-map", "useMapLink");
  10020. test.done();
  10021. },
  10022. /**
  10023. *
  10024. The vspace attribute specifies the vertical space above or below this
  10025. image, applet or object.
  10026. Retrieve the vspace attribute of the first OBJECT element and examine
  10027. it's value.
  10028. * @author NIST
  10029. * @author Mary Brady
  10030. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-8682483
  10031. */
  10032. HTMLObjectElement16: function(test) {
  10033. var success;
  10034. var nodeList;
  10035. var testNode;
  10036. var vvspace;
  10037. var doc;
  10038. var docRef = null;
  10039. if (typeof(this.doc) != 'undefined') {
  10040. docRef = this.doc;
  10041. }
  10042. doc = load("object");
  10043. nodeList = doc.getElementsByTagName("object");
  10044. test.equal(nodeList.length, 2, 'Asize');
  10045. testNode = nodeList.item(0);
  10046. vvspace = testNode.vspace;
  10047. test.equal(vvspace, 0, "vspaceLink");
  10048. test.done();
  10049. },
  10050. /**
  10051. *
  10052. The width attribute overrides the original width value.
  10053. Retrieve the width attribute of the first OBJECT element and examine
  10054. its value.
  10055. * @author NIST
  10056. * @author Mary Brady
  10057. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38538620
  10058. */
  10059. HTMLObjectElement17: function(test) {
  10060. var success;
  10061. var nodeList;
  10062. var testNode;
  10063. var vwidth;
  10064. var doc;
  10065. var docRef = null;
  10066. if (typeof(this.doc) != 'undefined') {
  10067. docRef = this.doc;
  10068. }
  10069. doc = load("object");
  10070. nodeList = doc.getElementsByTagName("object");
  10071. test.equal(nodeList.length, 2, 'Asize');
  10072. testNode = nodeList.item(0);
  10073. vwidth = testNode.width;
  10074. test.equal(vwidth, "550", "widthLink");
  10075. test.done();
  10076. },
  10077. /**
  10078. *
  10079. The name attribute specifies form control or object name when submitted
  10080. with a form.
  10081. Retrieve the name attribute of the second OBJECT element and examine
  10082. its value.
  10083. * @author NIST
  10084. * @author Mary Brady
  10085. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20110362
  10086. */
  10087. HTMLObjectElement18: function(test) {
  10088. var success;
  10089. var nodeList;
  10090. var testNode;
  10091. var vname;
  10092. var doc;
  10093. var docRef = null;
  10094. if (typeof(this.doc) != 'undefined') {
  10095. docRef = this.doc;
  10096. }
  10097. doc = load("object");
  10098. nodeList = doc.getElementsByTagName("object");
  10099. test.equal(nodeList.length, 2, 'Asize');
  10100. testNode = nodeList.item(1);
  10101. vname = testNode.name;
  10102. test.equal(vname, "OBJECT2", "vspaceLink");
  10103. test.done();
  10104. },
  10105. /**
  10106. *
  10107. The form attribute returns null if control in not within the context of
  10108. form.
  10109. Retrieve the form attribute and examine its value.
  10110. * @author NIST
  10111. * @author Rick Rivello
  10112. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773
  10113. */
  10114. HTMLObjectElement19: function(test) {
  10115. var success;
  10116. var nodeList;
  10117. var testNode;
  10118. var vform;
  10119. var doc;
  10120. var docRef = null;
  10121. if (typeof(this.doc) != 'undefined') {
  10122. docRef = this.doc;
  10123. }
  10124. doc = load("object2");
  10125. nodeList = doc.getElementsByTagName("object");
  10126. test.equal(nodeList.length, 2, 'Asize');
  10127. testNode = nodeList.item(0);
  10128. vform = testNode.form;
  10129. test.equal(vform, null, 'vform should be null');
  10130. test.done();
  10131. },
  10132. /**
  10133. *
  10134. The contentDocument attribute specifies the document this object contains,
  10135. if there is any and it is available, or null otherwise.
  10136. * @author NIST
  10137. * @author Rick Rivello
  10138. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-38538621
  10139. */
  10140. HTMLObjectElement20: function(test) {
  10141. var success;
  10142. var testNode;
  10143. var cd;
  10144. var vtitle;
  10145. var doc;
  10146. var nodeList;
  10147. var docRef = null;
  10148. if (typeof(this.doc) != 'undefined') {
  10149. docRef = this.doc;
  10150. }
  10151. doc = load("object2");
  10152. nodeList = doc.getElementsByTagName("object");
  10153. testNode = nodeList.item(1);
  10154. cd = testNode.contentDocument;
  10155. test.equal(cd, null, 'cd should be null');
  10156. test.done();
  10157. },
  10158. /**
  10159. *
  10160. The disabled attribute indicates that the control is unavailable in
  10161. this context.
  10162. Retrieve the disabled attribute and examine its value.
  10163. * @author NIST
  10164. * @author Mary Brady
  10165. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15518803
  10166. */
  10167. HTMLOptGroupElement01: function(test) {
  10168. var success;
  10169. var nodeList;
  10170. var testNode;
  10171. var vdisabled;
  10172. var doc;
  10173. var docRef = null;
  10174. if (typeof(this.doc) != 'undefined') {
  10175. docRef = this.doc;
  10176. }
  10177. doc = load("optgroup");
  10178. nodeList = doc.getElementsByTagName("optgroup");
  10179. test.equal(nodeList.length, 2, 'Asize');
  10180. testNode = nodeList.item(1);
  10181. vdisabled = testNode.disabled;
  10182. test.ok(vdisabled, 'disabledLink');
  10183. test.done();
  10184. },
  10185. /**
  10186. *
  10187. The label attribute specifies the label assigned to this option group.
  10188. Retrieve the label attribute and examine its value.
  10189. * @author NIST
  10190. * @author Mary Brady
  10191. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95806054
  10192. */
  10193. HTMLOptGroupElement02: function(test) {
  10194. var success;
  10195. var nodeList;
  10196. var testNode;
  10197. var vlabel;
  10198. var doc;
  10199. var docRef = null;
  10200. if (typeof(this.doc) != 'undefined') {
  10201. docRef = this.doc;
  10202. }
  10203. doc = load("optgroup");
  10204. nodeList = doc.getElementsByTagName("optgroup");
  10205. test.equal(nodeList.length, 2, 'Asize');
  10206. testNode = nodeList.item(0);
  10207. vlabel = testNode.label;
  10208. test.equal(vlabel, "Regular Employees", "labelLink");
  10209. test.done();
  10210. },
  10211. /**
  10212. *
  10213. The form attribute returns the FORM element containing this control.
  10214. Retrieve the form attribute from the first SELECT element
  10215. and examine its value.
  10216. * @author NIST
  10217. * @author Mary Brady
  10218. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-17116503
  10219. */
  10220. HTMLOptionElement01: function(test) {
  10221. var success;
  10222. var nodeList;
  10223. var testNode;
  10224. var vform;
  10225. var fNode;
  10226. var doc;
  10227. var docRef = null;
  10228. if (typeof(this.doc) != 'undefined') {
  10229. docRef = this.doc;
  10230. }
  10231. doc = load("option");
  10232. nodeList = doc.getElementsByTagName("option");
  10233. test.equal(nodeList.length, 10, 'Asize');
  10234. testNode = nodeList.item(0);
  10235. fNode = testNode.form;
  10236. vform = fNode.id;
  10237. test.equal(vform, "form1", "formLink");
  10238. test.done();
  10239. },
  10240. /**
  10241. *
  10242. The form attribute returns null if control in not within the context of
  10243. a form.
  10244. Retrieve the first OPTION attribute from the second select element and
  10245. examine its form element.
  10246. * @author NIST
  10247. * @author Mary Brady
  10248. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-17116503
  10249. */
  10250. HTMLOptionElement02: function(test) {
  10251. var success;
  10252. var nodeList;
  10253. var testNode;
  10254. var vform;
  10255. var doc;
  10256. var docRef = null;
  10257. if (typeof(this.doc) != 'undefined') {
  10258. docRef = this.doc;
  10259. }
  10260. doc = load("option");
  10261. nodeList = doc.getElementsByTagName("option");
  10262. test.equal(nodeList.length, 10, 'Asize');
  10263. testNode = nodeList.item(6);
  10264. vform = testNode.form;
  10265. test.equal(vform, null, 'vform should be null');
  10266. test.done();
  10267. },
  10268. /**
  10269. *
  10270. The defaultSelected attribute contains the value of the selected
  10271. attribute.
  10272. Retrieve the defaultSelected attribute from the first OPTION element
  10273. and examine its value.
  10274. * @author NIST
  10275. * @author Mary Brady
  10276. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-37770574
  10277. */
  10278. HTMLOptionElement03: function(test) {
  10279. var success;
  10280. var nodeList;
  10281. var testNode;
  10282. var vdefaultselected;
  10283. var doc;
  10284. var docRef = null;
  10285. if (typeof(this.doc) != 'undefined') {
  10286. docRef = this.doc;
  10287. }
  10288. doc = load("option");
  10289. nodeList = doc.getElementsByTagName("option");
  10290. test.equal(nodeList.length, 10, 'Asize');
  10291. testNode = nodeList.item(0);
  10292. vdefaultselected = testNode.defaultSelected;
  10293. test.ok(vdefaultselected, 'defaultSelectedLink');
  10294. test.done();
  10295. },
  10296. /**
  10297. *
  10298. The text attribute contains the text contained within the option element.
  10299. Retrieve the text attribute from the second OPTION element
  10300. and examine its value.
  10301. * @author NIST
  10302. * @author Mary Brady
  10303. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48154426
  10304. */
  10305. HTMLOptionElement04: function(test) {
  10306. var success;
  10307. var nodeList;
  10308. var testNode;
  10309. var vtext;
  10310. var doc;
  10311. var docRef = null;
  10312. if (typeof(this.doc) != 'undefined') {
  10313. docRef = this.doc;
  10314. }
  10315. doc = load("option");
  10316. nodeList = doc.getElementsByTagName("option");
  10317. test.equal(nodeList.length, 10, 'Asize');
  10318. testNode = nodeList.item(1);
  10319. vtext = testNode.text;
  10320. test.equal(vtext, "EMP10002", "textLink");
  10321. test.done();
  10322. },
  10323. /**
  10324. *
  10325. The index attribute indicates th index of this OPTION in ints parent
  10326. SELECT.
  10327. Retrieve the index attribute from the seventh OPTION element
  10328. and examine its value.
  10329. * @author NIST
  10330. * @author Mary Brady
  10331. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14038413
  10332. */
  10333. HTMLOptionElement05: function(test) {
  10334. var success;
  10335. var nodeList;
  10336. var testNode;
  10337. var vindex;
  10338. var doc;
  10339. var docRef = null;
  10340. if (typeof(this.doc) != 'undefined') {
  10341. docRef = this.doc;
  10342. }
  10343. doc = load("option");
  10344. nodeList = doc.getElementsByTagName("option");
  10345. test.equal(nodeList.length, 10, 'Asize');
  10346. testNode = nodeList.item(6);
  10347. vindex = testNode.index;
  10348. test.equal(vindex, 1, "indexLink");
  10349. test.done();
  10350. },
  10351. /**
  10352. *
  10353. The disabled attribute indicates that this control is not available
  10354. within this context.
  10355. Retrieve the disabled attribute from the last OPTION element
  10356. and examine its value.
  10357. * @author NIST
  10358. * @author Mary Brady
  10359. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23482473
  10360. */
  10361. HTMLOptionElement06: function(test) {
  10362. var success;
  10363. var nodeList;
  10364. var testNode;
  10365. var vdisabled;
  10366. var doc;
  10367. var docRef = null;
  10368. if (typeof(this.doc) != 'undefined') {
  10369. docRef = this.doc;
  10370. }
  10371. doc = load("option");
  10372. nodeList = doc.getElementsByTagName("option");
  10373. test.equal(nodeList.length, 10, 'Asize');
  10374. testNode = nodeList.item(9);
  10375. vdisabled = testNode.disabled;
  10376. test.ok(vdisabled, 'disabledLink');
  10377. test.done();
  10378. },
  10379. /**
  10380. *
  10381. The label attribute is used in hierarchical menus. It specifies
  10382. a shorter label for an option that the content of the OPTION element.
  10383. Retrieve the label attribute from the second OPTION element
  10384. and examine its value.
  10385. * @author NIST
  10386. * @author Mary Brady
  10387. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40736115
  10388. */
  10389. HTMLOptionElement07: function(test) {
  10390. var success;
  10391. var nodeList;
  10392. var testNode;
  10393. var vlabel;
  10394. var doc;
  10395. var docRef = null;
  10396. if (typeof(this.doc) != 'undefined') {
  10397. docRef = this.doc;
  10398. }
  10399. doc = load("option");
  10400. nodeList = doc.getElementsByTagName("option");
  10401. test.equal(nodeList.length, 10, 'Asize');
  10402. testNode = nodeList.item(1);
  10403. vlabel = testNode.label;
  10404. test.equal(vlabel, "l1", "labelLink");
  10405. test.done();
  10406. },
  10407. /**
  10408. *
  10409. The selected attribute indicates the current state of the corresponding
  10410. form control in an interactive user-agent.
  10411. Retrieve the selected attribute from the first OPTION element
  10412. and examine its value.
  10413. * @author NIST
  10414. * @author Mary Brady
  10415. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70874476
  10416. */
  10417. HTMLOptionElement08: function(test) {
  10418. var success;
  10419. var nodeList;
  10420. var testNode;
  10421. var vselected;
  10422. var doc;
  10423. var docRef = null;
  10424. if (typeof(this.doc) != 'undefined') {
  10425. docRef = this.doc;
  10426. }
  10427. doc = load("option");
  10428. nodeList = doc.getElementsByTagName("option");
  10429. test.equal(nodeList.length, 10, 'Asize');
  10430. testNode = nodeList.item(0);
  10431. vselected = testNode.defaultSelected;
  10432. test.ok(vselected, 'selectedLink');
  10433. test.done();
  10434. },
  10435. /**
  10436. *
  10437. The value attribute contains the current form control value.
  10438. Retrieve the value attribute from the first OPTION element
  10439. and examine its value.
  10440. * @author NIST
  10441. * @author Mary Brady
  10442. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6185554
  10443. */
  10444. HTMLOptionElement09: function(test) {
  10445. var success;
  10446. var nodeList;
  10447. var testNode;
  10448. var vvalue;
  10449. var doc;
  10450. var docRef = null;
  10451. if (typeof(this.doc) != 'undefined') {
  10452. docRef = this.doc;
  10453. }
  10454. doc = load("option");
  10455. nodeList = doc.getElementsByTagName("option");
  10456. test.equal(nodeList.length, 10, 'Asize');
  10457. testNode = nodeList.item(0);
  10458. vvalue = testNode.value;
  10459. test.equal(vvalue, "10001", "valueLink");
  10460. test.done();
  10461. },
  10462. /**
  10463. *
  10464. An HTMLOptionsCollection is a list of nodes representing HTML option
  10465. element.
  10466. The length attribute specifies the length or size of the list.
  10467. Retrieve the first SELECT element and create a HTMLOptionsCollection
  10468. of the OPTION elements. Check the size of the length of OPTION elements.
  10469. * @author NIST
  10470. * @author Rick Rivello
  10471. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-length
  10472. */
  10473. HTMLOptionsCollection01: function(test) {
  10474. var success;
  10475. var nodeList;
  10476. var testNode;
  10477. var optionsList;
  10478. var vlength;
  10479. var doc;
  10480. var docRef = null;
  10481. if (typeof(this.doc) != 'undefined') {
  10482. docRef = this.doc;
  10483. }
  10484. doc = load("optionscollection");
  10485. nodeList = doc.getElementsByTagName("select");
  10486. test.equal(nodeList.length, 2, 'Asize');
  10487. testNode = nodeList.item(0);
  10488. optionsList = testNode.options;
  10489. vlength = optionsList.length;
  10490. test.equal(vlength, 5, "lengthLink");
  10491. test.done();
  10492. },
  10493. /**
  10494. *
  10495. An HTMLOptionsCollection is a list of nodes representing HTML option
  10496. element.
  10497. An individual node may be accessed by either ordinal index, the node's
  10498. name or id attributes. (Test ordinal index=3).
  10499. The item() method retrieves a node specified by ordinal index.
  10500. Nodes are numbered in tree order. The index origin is 0.
  10501. Retrieve the first SELECT element. Create a HTMLOptionsCollection.
  10502. Retrieve the fourth item in the list and examine its firstChild's
  10503. nodeValue.
  10504. * @author NIST
  10505. * @author Rick Rivello
  10506. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item
  10507. */
  10508. HTMLOptionsCollection02: function(test) {
  10509. var success;
  10510. var nodeList;
  10511. var testNode;
  10512. var optionsNode;
  10513. var optionsValueNode;
  10514. var optionsList;
  10515. var vvalue;
  10516. var doc;
  10517. var docRef = null;
  10518. if (typeof(this.doc) != 'undefined') {
  10519. docRef = this.doc;
  10520. }
  10521. doc = load("optionscollection");
  10522. nodeList = doc.getElementsByTagName("select");
  10523. test.equal(nodeList.length, 2, 'Asize');
  10524. testNode = nodeList.item(0);
  10525. optionsList = testNode.options;
  10526. optionsNode = optionsList.item(3);
  10527. optionsValueNode = optionsNode.firstChild;
  10528. vvalue = optionsValueNode.nodeValue;
  10529. test.equal(vvalue, "EMP10004", "valueIndexLink");
  10530. test.done();
  10531. },
  10532. /**
  10533. *
  10534. An HTMLOptionsCollection is a list of nodes representing HTML option
  10535. element.
  10536. An individual node may be accessed by either ordinal index, the node's
  10537. name or id attributes. (Test node name).
  10538. The namedItem method retrieves a Node using a name. It first searches
  10539. for a node with a matching id attribute. If it doesn't find one, it
  10540. then searches for a Node with a matching name attribute, but only
  10541. those elements that are allowed a name attribute.
  10542. Retrieve the first FORM element. Create a HTMLCollection of the elements.
  10543. Search for an element that has select1 as the value for the name attribute.
  10544. Get the nodeName of that element.
  10545. * @author NIST
  10546. * @author Rick Rivello
  10547. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem
  10548. */
  10549. HTMLOptionsCollection03: function(test) {
  10550. var success;
  10551. var nodeList;
  10552. var testNode;
  10553. var optionsNode;
  10554. var formsnodeList;
  10555. var vname;
  10556. var doc;
  10557. var docRef = null;
  10558. if (typeof(this.doc) != 'undefined') {
  10559. docRef = this.doc;
  10560. }
  10561. doc = load("optionscollection");
  10562. nodeList = doc.getElementsByTagName("form");
  10563. test.equal(nodeList.length, 1, 'Asize');
  10564. testNode = nodeList.item(0);
  10565. formsnodeList = testNode.elements;
  10566. optionsNode = formsnodeList.namedItem("select1");
  10567. vname = optionsNode.nodeName;
  10568. test.equal(vname, 'SELECT', 'nameIndexLink');
  10569. test.done();
  10570. },
  10571. /**
  10572. *
  10573. An HTMLOptionsCollection is a list of nodes representing HTML option
  10574. element.
  10575. An individual node may be accessed by either ordinal index, the node's
  10576. name or id attributes. (Test node name).
  10577. The namedItem method retrieves a Node using a name. It first searches
  10578. for a node with a matching id attribute. If it doesn't find one, it
  10579. then searches for a Node with a matching name attribute, but only
  10580. those elements that are allowed a name attribute.
  10581. Retrieve the first FORM element. Create a HTMLCollection of the elements.
  10582. Search for an element that has selectId as the value for the id attribute.
  10583. Get the nodeName of that element.
  10584. * @author NIST
  10585. * @author Rick Rivello
  10586. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem
  10587. */
  10588. HTMLOptionsCollection04: function(test) {
  10589. var success;
  10590. var nodeList;
  10591. var testNode;
  10592. var optionsNode;
  10593. var formsnodeList;
  10594. var vname;
  10595. var doc;
  10596. var docRef = null;
  10597. if (typeof(this.doc) != 'undefined') {
  10598. docRef = this.doc;
  10599. }
  10600. doc = load("optionscollection");
  10601. nodeList = doc.getElementsByTagName("form");
  10602. test.equal(nodeList.length, 1, 'Asize');
  10603. testNode = nodeList.item(0);
  10604. formsnodeList = testNode.elements;
  10605. optionsNode = formsnodeList.namedItem("selectId");
  10606. vname = optionsNode.nodeName;
  10607. test.equal(vname, 'SELECT', 'nameIndexLink');
  10608. test.done();
  10609. },
  10610. /**
  10611. *
  10612. An HTMLOptionsCollection is a list of nodes representing HTML option
  10613. element.
  10614. An individual node may be accessed by either ordinal index, the node's
  10615. name or id attributes. (Test node name).
  10616. The namedItem method retrieves a Node using a name. It first searches
  10617. for a node with a matching id attribute. If it doesn't find one, it
  10618. then searches for a Node with a matching name attribute, but only
  10619. those elements that are allowed a name attribute. Upon failure(e.q., no
  10620. node with this name exists), returns null.
  10621. Retrieve the first FORM element. Create a HTMLCollection of the elements.
  10622. Search for an element that has select9 as the value for the name attribute.
  10623. Null should be returned since there is not any name or id attribute with
  10624. select9 as a value.
  10625. * @author NIST
  10626. * @author Rick Rivello
  10627. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem
  10628. */
  10629. HTMLOptionsCollection05: function(test) {
  10630. var success;
  10631. var nodeList;
  10632. var testNode;
  10633. var optionsNode;
  10634. var formsnodeList;
  10635. var vname;
  10636. var doc;
  10637. var docRef = null;
  10638. if (typeof(this.doc) != 'undefined') {
  10639. docRef = this.doc;
  10640. }
  10641. doc = load("optionscollection");
  10642. nodeList = doc.getElementsByTagName("form");
  10643. test.equal(nodeList.length, 1, 'Asize');
  10644. testNode = nodeList.item(0);
  10645. formsnodeList = testNode.elements;
  10646. optionsNode = formsnodeList.namedItem("select9");
  10647. test.equal(optionsNode, null, 'optionsNode should be null');
  10648. test.done();
  10649. },
  10650. /**
  10651. *
  10652. An HTMLOptionsCollection is a list of nodes representing HTML option
  10653. element.
  10654. An individual node may be accessed by either ordinal index, the node's
  10655. name or id attributes. (Test ordinal index).
  10656. The item() method retrieves a node specified by ordinal index.
  10657. A value of null is returned if the index is out of range.
  10658. Retrieve the first SELECT element. Create a HTMLOptionsCollection.
  10659. Retrieve the tenth item in the list - null should be returned since
  10660. there are not 10 items in the list.
  10661. * @author NIST
  10662. * @author Rick Rivello
  10663. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item
  10664. */
  10665. HTMLOptionsCollection06: function(test) {
  10666. var success;
  10667. var nodeList;
  10668. var testNode;
  10669. var optionsNode;
  10670. var optionsValueNode;
  10671. var optionsList;
  10672. var vvalue;
  10673. var doc;
  10674. var docRef = null;
  10675. if (typeof(this.doc) != 'undefined') {
  10676. docRef = this.doc;
  10677. }
  10678. doc = load("optionscollection");
  10679. nodeList = doc.getElementsByTagName("select");
  10680. test.equal(nodeList.length, 2, 'Asize');
  10681. testNode = nodeList.item(0);
  10682. optionsList = testNode.options;
  10683. optionsNode = optionsList.item(10);
  10684. test.equal(optionsNode, null, 'optionsNode should be null');
  10685. test.done();
  10686. },
  10687. /**
  10688. *
  10689. An HTMLOptionsCollection is a list of nodes representing HTML option
  10690. element.
  10691. An individual node may be accessed by either ordinal index, the node's
  10692. name or id attributes. (Test ordinal index=0).
  10693. The item() method retrieves a node specified by ordinal index. Nodes
  10694. are numbered in tree order. The index origin is 0.
  10695. Retrieve the first SELECT element. Create a HTMLOptionsCollection.
  10696. Retrieve the first item in the list and examine its firstChild's
  10697. nodeValue.
  10698. * @author NIST
  10699. * @author Rick Rivello
  10700. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item
  10701. */
  10702. HTMLOptionsCollection07: function(test) {
  10703. var success;
  10704. var nodeList;
  10705. var testNode;
  10706. var optionsNode;
  10707. var optionsValueNode;
  10708. var optionsList;
  10709. var vvalue;
  10710. var doc;
  10711. var docRef = null;
  10712. if (typeof(this.doc) != 'undefined') {
  10713. docRef = this.doc;
  10714. }
  10715. doc = load("optionscollection");
  10716. nodeList = doc.getElementsByTagName("select");
  10717. test.equal(nodeList.length, 2, 'Asize');
  10718. testNode = nodeList.item(0);
  10719. optionsList = testNode.options;
  10720. optionsNode = optionsList.item(0);
  10721. optionsValueNode = optionsNode.firstChild;
  10722. vvalue = optionsValueNode.nodeValue;
  10723. test.equal(vvalue, "EMP10001", "valueIndexLink");
  10724. test.done();
  10725. },
  10726. /**
  10727. *
  10728. The align attribute specifies the horizontal text alignment.
  10729. Retrieve the align attribute and examine its value.
  10730. * @author NIST
  10731. * @author Mary Brady
  10732. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53465507
  10733. */
  10734. HTMLParagraphElement01: function(test) {
  10735. var success;
  10736. var nodeList;
  10737. var testNode;
  10738. var valign;
  10739. var doc;
  10740. var docRef = null;
  10741. if (typeof(this.doc) != 'undefined') {
  10742. docRef = this.doc;
  10743. }
  10744. doc = load("paragraph");
  10745. nodeList = doc.getElementsByTagName("p");
  10746. test.equal(nodeList.length, 1, 'Asize');
  10747. testNode = nodeList.item(0);
  10748. valign = testNode.align;
  10749. test.equal(valign, "center", "alignLink");
  10750. test.done();
  10751. },
  10752. /**
  10753. *
  10754. The name attribute specifies the name of the run-time parameter.
  10755. Retrieve the name attribute and examine its value.
  10756. * @author NIST
  10757. * @author Mary Brady
  10758. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59871447
  10759. */
  10760. HTMLParamElement01: function(test) {
  10761. var success;
  10762. var nodeList;
  10763. var testNode;
  10764. var vname;
  10765. var doc;
  10766. var docRef = null;
  10767. if (typeof(this.doc) != 'undefined') {
  10768. docRef = this.doc;
  10769. }
  10770. doc = load("param");
  10771. nodeList = doc.getElementsByTagName("param");
  10772. test.equal(nodeList.length, 1, 'Asize');
  10773. testNode = nodeList.item(0);
  10774. vname = testNode.name;
  10775. test.equal(vname, "image3", "nameLink");
  10776. test.done();
  10777. },
  10778. /**
  10779. *
  10780. The value attribute specifies the value of the run-time parameter.
  10781. Retrieve the value attribute and examine its value.
  10782. * @author NIST
  10783. * @author Mary Brady
  10784. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77971357
  10785. */
  10786. HTMLParamElement02: function(test) {
  10787. var success;
  10788. var nodeList;
  10789. var testNode;
  10790. var vvalue;
  10791. var doc;
  10792. var docRef = null;
  10793. if (typeof(this.doc) != 'undefined') {
  10794. docRef = this.doc;
  10795. }
  10796. doc = load("param");
  10797. nodeList = doc.getElementsByTagName("param");
  10798. test.equal(nodeList.length, 1, 'Asize');
  10799. testNode = nodeList.item(0);
  10800. vvalue = testNode.value;
  10801. test.equal(vvalue, 'image/file.gif', 'valueLink');
  10802. test.done();
  10803. },
  10804. /**
  10805. *
  10806. The valueType attribute specifies information about the meaning of the
  10807. value specified by the value attribute.
  10808. Retrieve the valueType attribute and examine its value.
  10809. * @author NIST
  10810. * @author Mary Brady
  10811. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23931872
  10812. */
  10813. HTMLParamElement03: function(test) {
  10814. var success;
  10815. var nodeList;
  10816. var testNode;
  10817. var vvaluetype;
  10818. var doc;
  10819. var docRef = null;
  10820. if (typeof(this.doc) != 'undefined') {
  10821. docRef = this.doc;
  10822. }
  10823. doc = load("param");
  10824. nodeList = doc.getElementsByTagName("param");
  10825. test.equal(nodeList.length, 1, 'Asize');
  10826. testNode = nodeList.item(0);
  10827. vvaluetype = testNode.valueType;
  10828. test.equal(vvaluetype, "ref", "valueTypeLink");
  10829. test.done();
  10830. },
  10831. /**
  10832. *
  10833. The type attribute specifies the content type for the value attribute
  10834. when valuetype has the value ref.
  10835. Retrieve the type attribute and examine its value.
  10836. * @author NIST
  10837. * @author Mary Brady
  10838. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18179888
  10839. */
  10840. HTMLParamElement04: function(test) {
  10841. var success;
  10842. var nodeList;
  10843. var testNode;
  10844. var vtype;
  10845. var doc;
  10846. var docRef = null;
  10847. if (typeof(this.doc) != 'undefined') {
  10848. docRef = this.doc;
  10849. }
  10850. doc = load("param");
  10851. nodeList = doc.getElementsByTagName("param");
  10852. test.equal(nodeList.length, 1, 'Asize');
  10853. testNode = nodeList.item(0);
  10854. vtype = testNode.type;
  10855. test.equal(vtype, "image/gif", "typeLink");
  10856. test.done();
  10857. },
  10858. /**
  10859. *
  10860. The width attribute specifies the fixed width for content.
  10861. Retrieve the width attribute and examine its value.
  10862. * @author NIST
  10863. * @author Mary Brady
  10864. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13894083
  10865. */
  10866. HTMLPreElement01: function(test) {
  10867. var success;
  10868. var nodeList;
  10869. var testNode;
  10870. var vwidth;
  10871. var doc;
  10872. var docRef = null;
  10873. if (typeof(this.doc) != 'undefined') {
  10874. docRef = this.doc;
  10875. }
  10876. doc = load("pre");
  10877. nodeList = doc.getElementsByTagName("pre");
  10878. test.equal(nodeList.length, 1, 'Asize');
  10879. testNode = nodeList.item(0);
  10880. vwidth = testNode.width;
  10881. test.equal(vwidth, 277, "widthLink");
  10882. test.done();
  10883. },
  10884. /**
  10885. *
  10886. The cite attribute specifies a URI designating a source document
  10887. or message.
  10888. Retrieve the cite attribute from the Q element and examine its value.
  10889. * @author NIST
  10890. * @author Mary Brady
  10891. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53895598
  10892. */
  10893. HTMLQuoteElement01: function(test) {
  10894. var success;
  10895. var nodeList;
  10896. var testNode;
  10897. var vcite;
  10898. var doc;
  10899. var docRef = null;
  10900. if (typeof(this.doc) != 'undefined') {
  10901. docRef = this.doc;
  10902. }
  10903. doc = load("quote");
  10904. nodeList = doc.getElementsByTagName("q");
  10905. test.equal(nodeList.length, 1, 'Asize');
  10906. testNode = nodeList.item(0);
  10907. vcite = testNode.cite;
  10908. test.equal(vcite, './files/Q.html', 'citeLink');
  10909. test.done();
  10910. },
  10911. /**
  10912. *
  10913. The cite attribute specifies a URI designating a source document
  10914. or message.
  10915. Retrieve the cite attribute from the BLOCKQUOTE element and
  10916. examine its value.
  10917. * @author NIST
  10918. * @author Mary Brady
  10919. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53895598
  10920. */
  10921. HTMLQuoteElement02: function(test) {
  10922. var success;
  10923. var nodeList;
  10924. var testNode;
  10925. var vcite;
  10926. var doc;
  10927. var docRef = null;
  10928. if (typeof(this.doc) != 'undefined') {
  10929. docRef = this.doc;
  10930. }
  10931. doc = load("quote");
  10932. nodeList = doc.getElementsByTagName("blockquote");
  10933. test.equal(nodeList.length, 1, 'Asize');
  10934. testNode = nodeList.item(0);
  10935. vcite = testNode.cite;
  10936. test.equal(vcite, './files/BLOCKQUOTE.html', 'citeLink');
  10937. test.done();
  10938. },
  10939. /**
  10940. *
  10941. The text attribute specifies the script content of the element.
  10942. Retrieve the text attribute and examine its value.
  10943. * @author NIST
  10944. * @author Mary Brady
  10945. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46872999
  10946. */
  10947. HTMLScriptElement01: function(test) {
  10948. var success;
  10949. var nodeList;
  10950. var testNode;
  10951. var vtext;
  10952. var doc;
  10953. var docRef = null;
  10954. if (typeof(this.doc) != 'undefined') {
  10955. docRef = this.doc;
  10956. }
  10957. doc = load("script");
  10958. nodeList = doc.getElementsByTagName("script");
  10959. test.equal(nodeList.length, 1, 'Asize');
  10960. testNode = nodeList.item(0);
  10961. vtext = testNode.text;
  10962. test.equal(vtext, "var a=2;", "textLink");
  10963. test.done();
  10964. },
  10965. /**
  10966. *
  10967. The charset attribute specifies the character encoding of the linked
  10968. resource.
  10969. Retrieve the charset attribute and examine its value.
  10970. * @author NIST
  10971. * @author Mary Brady
  10972. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35305677
  10973. */
  10974. HTMLScriptElement02: function(test) {
  10975. var success;
  10976. var nodeList;
  10977. var testNode;
  10978. var vcharset;
  10979. var doc;
  10980. var docRef = null;
  10981. if (typeof(this.doc) != 'undefined') {
  10982. docRef = this.doc;
  10983. }
  10984. doc = load("script");
  10985. nodeList = doc.getElementsByTagName("script");
  10986. test.equal(nodeList.length, 1, 'Asize');
  10987. testNode = nodeList.item(0);
  10988. vcharset = testNode.charset;
  10989. test.equal(vcharset, "US-ASCII", "charsetLink");
  10990. test.done();
  10991. },
  10992. /**
  10993. *
  10994. The defer attribute specifies the user agent can defer processing of
  10995. the script.
  10996. Retrieve the defer attribute and examine its value.
  10997. * @author NIST
  10998. * @author Mary Brady
  10999. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93788534
  11000. */
  11001. HTMLScriptElement03: function(test) {
  11002. var success;
  11003. var nodeList;
  11004. var testNode;
  11005. var vdefer;
  11006. var doc;
  11007. var docRef = null;
  11008. if (typeof(this.doc) != 'undefined') {
  11009. docRef = this.doc;
  11010. }
  11011. doc = load("script");
  11012. nodeList = doc.getElementsByTagName("script");
  11013. test.equal(nodeList.length, 1, 'Asize');
  11014. testNode = nodeList.item(0);
  11015. vdefer = testNode.defer;
  11016. test.ok(vdefer, 'deferLink');
  11017. test.done();
  11018. },
  11019. /**
  11020. *
  11021. The src attribute specifies a URI designating an external script.
  11022. Retrieve the src attribute and examine its value.
  11023. * @author NIST
  11024. * @author Mary Brady
  11025. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75147231
  11026. */
  11027. HTMLScriptElement04: function(test) {
  11028. var success;
  11029. var nodeList;
  11030. var testNode;
  11031. var vsrc;
  11032. var doc;
  11033. var docRef = null;
  11034. if (typeof(this.doc) != 'undefined') {
  11035. docRef = this.doc;
  11036. }
  11037. doc = load("script");
  11038. nodeList = doc.getElementsByTagName("script");
  11039. test.equal(nodeList.length, 1, 'Asize');
  11040. testNode = nodeList.item(0);
  11041. vsrc = testNode.src;
  11042. test.equal(vsrc, './js/script1.js', 'srcLink');
  11043. test.done();
  11044. },
  11045. /**
  11046. *
  11047. The type attribute specifies the content of the script language.
  11048. Retrieve the type attribute and examine its value.
  11049. * @author NIST
  11050. * @author Mary Brady
  11051. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30534818
  11052. */
  11053. HTMLScriptElement05: function(test) {
  11054. var success;
  11055. var nodeList;
  11056. var testNode;
  11057. var vtype;
  11058. var doc;
  11059. var docRef = null;
  11060. if (typeof(this.doc) != 'undefined') {
  11061. docRef = this.doc;
  11062. }
  11063. doc = load("script");
  11064. nodeList = doc.getElementsByTagName("script");
  11065. test.equal(nodeList.length, 1, 'Asize');
  11066. testNode = nodeList.item(0);
  11067. vtype = testNode.type;
  11068. test.equal(vtype, "text/javaScript", "typeLink");
  11069. test.done();
  11070. },
  11071. /**
  11072. *
  11073. htmlFor is described as for future use. Test accesses the value, but makes no assertions about its value.
  11074. * @author Curt Arnold
  11075. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66979266
  11076. */
  11077. HTMLScriptElement06: function(test) {
  11078. var success;
  11079. var nodeList;
  11080. var testNode;
  11081. var htmlFor;
  11082. var doc;
  11083. var docRef = null;
  11084. if (typeof(this.doc) != 'undefined') {
  11085. docRef = this.doc;
  11086. }
  11087. doc = load("script");
  11088. nodeList = doc.getElementsByTagName("script");
  11089. test.equal(nodeList.length, 1, 'Asize');
  11090. testNode = nodeList.item(0);
  11091. htmlFor = testNode.htmlFor;
  11092. test.done();
  11093. },
  11094. /**
  11095. *
  11096. event is described as for future use. Test accesses the value, but makes no assertions about its value.
  11097. * @author Curt Arnold
  11098. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-56700403
  11099. */
  11100. HTMLScriptElement07: function(test) {
  11101. var success;
  11102. var nodeList;
  11103. var testNode;
  11104. var event;
  11105. var doc;
  11106. var docRef = null;
  11107. if (typeof(this.doc) != 'undefined') {
  11108. docRef = this.doc;
  11109. }
  11110. doc = load("script");
  11111. nodeList = doc.getElementsByTagName("script");
  11112. test.equal(nodeList.length, 1, 'Asize');
  11113. testNode = nodeList.item(0);
  11114. event = testNode.event;
  11115. test.done();
  11116. },
  11117. /**
  11118. *
  11119. The type attribute is the string "select-multiple" when multiple
  11120. attribute is true.
  11121. Retrieve the type attribute from the first SELECT element and
  11122. examine its value.
  11123. * @author NIST
  11124. * @author Mary Brady
  11125. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58783172
  11126. */
  11127. HTMLSelectElement01: function(test) {
  11128. var success;
  11129. var nodeList;
  11130. var testNode;
  11131. var vtype;
  11132. var doc;
  11133. var docRef = null;
  11134. if (typeof(this.doc) != 'undefined') {
  11135. docRef = this.doc;
  11136. }
  11137. doc = load("select");
  11138. nodeList = doc.getElementsByTagName("select");
  11139. test.equal(nodeList.length, 3, 'Asize');
  11140. testNode = nodeList.item(0);
  11141. vtype = testNode.type;
  11142. test.equal(vtype, "select-multiple", "typeLink");
  11143. test.done();
  11144. },
  11145. /**
  11146. *
  11147. The selectedIndex attribute specifies the ordinal index of the selected
  11148. option.
  11149. Retrieve the selectedIndex attribute from the first SELECT element and
  11150. examine its value.
  11151. * @author NIST
  11152. * @author Mary Brady
  11153. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85676760
  11154. */
  11155. HTMLSelectElement02: function(test) {
  11156. var success;
  11157. var nodeList;
  11158. var testNode;
  11159. var vselectedindex;
  11160. var doc;
  11161. var docRef = null;
  11162. if (typeof(this.doc) != 'undefined') {
  11163. docRef = this.doc;
  11164. }
  11165. doc = load("select");
  11166. nodeList = doc.getElementsByTagName("select");
  11167. test.equal(nodeList.length, 3, 'Asize');
  11168. testNode = nodeList.item(0);
  11169. vselectedindex = testNode.selectedIndex;
  11170. test.equal(vselectedindex, 0, "selectedIndexLink");
  11171. test.done();
  11172. },
  11173. /**
  11174. *
  11175. The selectedIndex attribute specifies the ordinal index of the selected
  11176. option. If no element is selected -1 is returned.
  11177. Retrieve the selectedIndex attribute from the second SELECT element and
  11178. examine its value.
  11179. Per http://www.w3.org/TR/html401/interact/forms.html#h-17.6.1,
  11180. without an explicit selected attribute, user agent behavior is
  11181. undefined. There is no way to coerce no option to be selected.
  11182. * @author NIST
  11183. * @author Mary Brady
  11184. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85676760
  11185. */
  11186. HTMLSelectElement03: function(test) {
  11187. var success;
  11188. var nodeList;
  11189. var testNode;
  11190. var vselectedindex;
  11191. var doc;
  11192. var docRef = null;
  11193. if (typeof(this.doc) != 'undefined') {
  11194. docRef = this.doc;
  11195. }
  11196. doc = load("select");
  11197. nodeList = doc.getElementsByTagName("select");
  11198. test.equal(nodeList.length, 3, 'Asize');
  11199. testNode = nodeList.item(1);
  11200. vselectedindex = testNode.selectedIndex;
  11201. test.done();
  11202. },
  11203. /**
  11204. *
  11205. The value attribute specifies the current form control value.
  11206. Retrieve the value attribute from the first SELECT element and
  11207. examine its value.
  11208. * @author NIST
  11209. * @author Mary Brady
  11210. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59351919
  11211. */
  11212. HTMLSelectElement04: function(test) {
  11213. var success;
  11214. var nodeList;
  11215. var testNode;
  11216. var vvalue;
  11217. var doc;
  11218. var docRef = null;
  11219. if (typeof(this.doc) != 'undefined') {
  11220. docRef = this.doc;
  11221. }
  11222. doc = load("select");
  11223. nodeList = doc.getElementsByTagName("select");
  11224. test.equal(nodeList.length, 3, 'Asize');
  11225. testNode = nodeList.item(0);
  11226. vvalue = testNode.value;
  11227. test.equal(vvalue, "EMP1", "valueLink");
  11228. test.done();
  11229. },
  11230. /**
  11231. *
  11232. The length attribute specifies the number of options in this select.
  11233. Retrieve the length attribute from the first SELECT element and
  11234. examine its value.
  11235. * @author NIST
  11236. * @author Mary Brady
  11237. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5933486
  11238. */
  11239. HTMLSelectElement05: function(test) {
  11240. var success;
  11241. var nodeList;
  11242. var testNode;
  11243. var vlength;
  11244. var doc;
  11245. var docRef = null;
  11246. if (typeof(this.doc) != 'undefined') {
  11247. docRef = this.doc;
  11248. }
  11249. doc = load("select");
  11250. nodeList = doc.getElementsByTagName("select");
  11251. test.equal(nodeList.length, 3, 'Asize');
  11252. testNode = nodeList.item(0);
  11253. vlength = testNode.length;
  11254. test.equal(vlength, 5, "lengthLink");
  11255. test.done();
  11256. },
  11257. /**
  11258. *
  11259. The form attribute returns the FORM element containing this control.
  11260. Retrieve the form attribute from the first SELECT element
  11261. and examine its value.
  11262. * @author NIST
  11263. * @author Mary Brady
  11264. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20489458
  11265. */
  11266. HTMLSelectElement06: function(test) {
  11267. var success;
  11268. var nodeList;
  11269. var testNode;
  11270. var vform;
  11271. var fNode;
  11272. var doc;
  11273. var docRef = null;
  11274. if (typeof(this.doc) != 'undefined') {
  11275. docRef = this.doc;
  11276. }
  11277. doc = load("select");
  11278. nodeList = doc.getElementsByTagName("select");
  11279. test.equal(nodeList.length, 3, 'Asize');
  11280. testNode = nodeList.item(0);
  11281. fNode = testNode.form;
  11282. vform = fNode.id;
  11283. test.equal(vform, "form1", "formLink");
  11284. test.done();
  11285. },
  11286. /**
  11287. *
  11288. The form attribute returns null if control in not within the context of
  11289. a form.
  11290. Retrieve the second SELECT element and
  11291. examine its form element.
  11292. * @author NIST
  11293. * @author Mary Brady
  11294. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20489458
  11295. */
  11296. HTMLSelectElement07: function(test) {
  11297. var success;
  11298. var nodeList;
  11299. var testNode;
  11300. var vform;
  11301. var doc;
  11302. var docRef = null;
  11303. if (typeof(this.doc) != 'undefined') {
  11304. docRef = this.doc;
  11305. }
  11306. doc = load("select");
  11307. nodeList = doc.getElementsByTagName("select");
  11308. test.equal(nodeList.length, 3, 'Asize');
  11309. testNode = nodeList.item(1);
  11310. vform = testNode.form;
  11311. test.equal(vform, null, 'vform should be null');
  11312. test.done();
  11313. },
  11314. /**
  11315. *
  11316. The options attribute returns a collection of OPTION elements contained
  11317. by this element.
  11318. Retrieve the options attribute from the first SELECT element and
  11319. examine the items of the returned collection.
  11320. * @author NIST
  11321. * @author Mary Brady
  11322. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30606413
  11323. */
  11324. HTMLSelectElement08: function(test) {
  11325. var expectedOptions = ['OPTION', 'OPTION', 'OPTION', 'OPTION', 'OPTION']
  11326. var doc = load("select");
  11327. var nodeList = doc.getElementsByTagName("select");
  11328. test.equal(nodeList.length, 3, 'Asize');
  11329. var result = [];
  11330. var options = nodeList.item(0).options;
  11331. for(var i=0;i<options.length; i++) {
  11332. result.push(options.item(i).nodeName);
  11333. }
  11334. test.deepEqual(result, expectedOptions, 'optionsLink');
  11335. test.done();
  11336. },
  11337. /**
  11338. *
  11339. The disabled attribute indicates that this control is not available
  11340. within this context.
  11341. Retrieve the disabled attribute from the third SELECT element
  11342. and examine its value.
  11343. * @author NIST
  11344. * @author Mary Brady
  11345. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79102918
  11346. */
  11347. HTMLSelectElement09: function(test) {
  11348. var success;
  11349. var nodeList;
  11350. var testNode;
  11351. var vdisabled;
  11352. var doc;
  11353. var docRef = null;
  11354. if (typeof(this.doc) != 'undefined') {
  11355. docRef = this.doc;
  11356. }
  11357. doc = load("select");
  11358. nodeList = doc.getElementsByTagName("select");
  11359. test.equal(nodeList.length, 3, 'Asize');
  11360. testNode = nodeList.item(2);
  11361. vdisabled = testNode.disabled;
  11362. test.ok(vdisabled, 'disabledLink');
  11363. test.done();
  11364. },
  11365. /**
  11366. *
  11367. The multiple attribute(if true) indicates that multiple OPTION elements
  11368. may be selected
  11369. Retrieve the multiple attribute from the first SELECT element
  11370. and examine its value.
  11371. * @author NIST
  11372. * @author Mary Brady
  11373. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13246613
  11374. */
  11375. HTMLSelectElement10: function(test) {
  11376. var success;
  11377. var nodeList;
  11378. var testNode;
  11379. var vmultiple;
  11380. var doc;
  11381. var docRef = null;
  11382. if (typeof(this.doc) != 'undefined') {
  11383. docRef = this.doc;
  11384. }
  11385. doc = load("select");
  11386. nodeList = doc.getElementsByTagName("select");
  11387. test.equal(nodeList.length, 3, 'Asize');
  11388. testNode = nodeList.item(0);
  11389. vmultiple = testNode.multiple;
  11390. test.ok(vmultiple, 'multipleLink');
  11391. test.done();
  11392. },
  11393. /**
  11394. *
  11395. The name attribute specifies the form control or object name when
  11396. submitted with a form.
  11397. Retrieve the name attribute from the first SELECT element and
  11398. examine its value.
  11399. * @author NIST
  11400. * @author Mary Brady
  11401. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41636323
  11402. */
  11403. HTMLSelectElement11: function(test) {
  11404. var success;
  11405. var nodeList;
  11406. var testNode;
  11407. var vname;
  11408. var doc;
  11409. var docRef = null;
  11410. if (typeof(this.doc) != 'undefined') {
  11411. docRef = this.doc;
  11412. }
  11413. doc = load("select");
  11414. nodeList = doc.getElementsByTagName("select");
  11415. test.equal(nodeList.length, 3, 'Asize');
  11416. testNode = nodeList.item(0);
  11417. vname = testNode.name;
  11418. test.equal(vname, "select1", "nameLink");
  11419. test.done();
  11420. },
  11421. /**
  11422. *
  11423. The size attribute specifies the number of visible rows.
  11424. Retrieve the size attribute from the first SELECT element and
  11425. examine its value.
  11426. * @author NIST
  11427. * @author Mary Brady
  11428. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18293826
  11429. */
  11430. HTMLSelectElement12: function(test) {
  11431. var success;
  11432. var nodeList;
  11433. var testNode;
  11434. var vsize;
  11435. var doc;
  11436. var docRef = null;
  11437. if (typeof(this.doc) != 'undefined') {
  11438. docRef = this.doc;
  11439. }
  11440. doc = load("select");
  11441. nodeList = doc.getElementsByTagName("select");
  11442. test.equal(nodeList.length, 3, 'Asize');
  11443. testNode = nodeList.item(0);
  11444. vsize = testNode.size;
  11445. test.equal(vsize, 1, "sizeLink");
  11446. test.done();
  11447. },
  11448. /**
  11449. *
  11450. The tabIndex attribute specifies an index that represents the elements
  11451. position in the tabbing order.
  11452. Retrieve the tabIndex attribute from the first SELECT element and
  11453. examine its value.
  11454. * @author NIST
  11455. * @author Mary Brady
  11456. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40676705
  11457. */
  11458. HTMLSelectElement13: function(test) {
  11459. var success;
  11460. var nodeList;
  11461. var testNode;
  11462. var vtabindex;
  11463. var doc;
  11464. var docRef = null;
  11465. if (typeof(this.doc) != 'undefined') {
  11466. docRef = this.doc;
  11467. }
  11468. doc = load("select");
  11469. nodeList = doc.getElementsByTagName("select");
  11470. test.equal(nodeList.length, 3, 'Asize');
  11471. testNode = nodeList.item(0);
  11472. vtabindex = testNode.tabIndex;
  11473. test.equal(vtabindex, 7, "tabIndexLink");
  11474. test.done();
  11475. },
  11476. /**
  11477. *
  11478. focus should give the select element input focus.
  11479. * @author Curt Arnold
  11480. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32130014
  11481. */
  11482. HTMLSelectElement14: function(test) {
  11483. var success;
  11484. var nodeList;
  11485. var testNode;
  11486. var doc;
  11487. var docRef = null;
  11488. if (typeof(this.doc) != 'undefined') {
  11489. docRef = this.doc;
  11490. }
  11491. doc = load("select");
  11492. nodeList = doc.getElementsByTagName("select");
  11493. test.equal(nodeList.length, 3, 'Asize');
  11494. testNode = nodeList.item(0);
  11495. testNode.focus();
  11496. test.done();
  11497. },
  11498. /**
  11499. *
  11500. blur should surrender input focus.
  11501. * @author Curt Arnold
  11502. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-28216144
  11503. */
  11504. HTMLSelectElement15: function(test) {
  11505. var success;
  11506. var nodeList;
  11507. var testNode;
  11508. var doc;
  11509. var docRef = null;
  11510. if (typeof(this.doc) != 'undefined') {
  11511. docRef = this.doc;
  11512. }
  11513. doc = load("select");
  11514. nodeList = doc.getElementsByTagName("select");
  11515. test.equal(nodeList.length, 3, 'Asize');
  11516. testNode = nodeList.item(0);
  11517. testNode.blur();
  11518. test.done();
  11519. },
  11520. /**
  11521. *
  11522. Removes an option using HTMLSelectElement.remove.
  11523. * @author Curt Arnold
  11524. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33404570
  11525. */
  11526. HTMLSelectElement16: function(test) {
  11527. var success;
  11528. var nodeList;
  11529. var testNode;
  11530. var doc;
  11531. var optLength;
  11532. var selected;
  11533. var docRef = null;
  11534. if (typeof(this.doc) != 'undefined') {
  11535. docRef = this.doc;
  11536. }
  11537. doc = load("select");
  11538. nodeList = doc.getElementsByTagName("select");
  11539. test.equal(nodeList.length, 3, 'Asize');
  11540. testNode = nodeList.item(0);
  11541. testNode.remove(0);
  11542. optLength = testNode.length;
  11543. test.equal(optLength, 4, "optLength");
  11544. selected = testNode.selectedIndex;
  11545. test.equal(selected, -1, "selected");
  11546. test.done();
  11547. },
  11548. /**
  11549. *
  11550. Removes a non-existant option using HTMLSelectElement.remove.
  11551. * @author Curt Arnold
  11552. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33404570
  11553. */
  11554. HTMLSelectElement17: function(test) {
  11555. var success;
  11556. var nodeList;
  11557. var testNode;
  11558. var doc;
  11559. var optLength;
  11560. var selected;
  11561. var docRef = null;
  11562. if (typeof(this.doc) != 'undefined') {
  11563. docRef = this.doc;
  11564. }
  11565. doc = load("select");
  11566. nodeList = doc.getElementsByTagName("select");
  11567. test.equal(nodeList.length, 3, 'Asize');
  11568. testNode = nodeList.item(0);
  11569. testNode.remove(6);
  11570. optLength = testNode.length;
  11571. test.equal(optLength, 5, "optLength");
  11572. selected = testNode.selectedIndex;
  11573. test.equal(selected, 0, "selected");
  11574. test.done();
  11575. },
  11576. /**
  11577. *
  11578. Add a new option at the end of an select using HTMLSelectElement.add.
  11579. * @author Curt Arnold
  11580. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14493106
  11581. */
  11582. HTMLSelectElement18: function(test) {
  11583. var success;
  11584. var nodeList;
  11585. var testNode;
  11586. var doc;
  11587. var optLength;
  11588. var selected;
  11589. var newOpt;
  11590. var newOptText;
  11591. var opt;
  11592. var optText;
  11593. var optValue;
  11594. var retNode;
  11595. var nullNode = null;
  11596. var docRef = null;
  11597. if (typeof(this.doc) != 'undefined') {
  11598. docRef = this.doc;
  11599. }
  11600. doc = load("select");
  11601. nodeList = doc.getElementsByTagName("select");
  11602. test.equal(nodeList.length, 3, 'Asize');
  11603. testNode = nodeList.item(0);
  11604. newOpt = doc.createElement("option");
  11605. newOptText = doc.createTextNode("EMP31415");
  11606. retNode = newOpt.appendChild(newOptText);
  11607. testNode.add(newOpt,nullNode);
  11608. optLength = testNode.length;
  11609. test.equal(optLength, 6, "optLength");
  11610. selected = testNode.selectedIndex;
  11611. test.equal(selected, 0, "selected");
  11612. opt = testNode.lastChild;
  11613. optText = opt.firstChild;
  11614. optValue = optText.nodeValue;
  11615. test.equal(optValue, "EMP31415", "lastValue");
  11616. test.done();
  11617. },
  11618. /**
  11619. *
  11620. Add a new option before the selected node using HTMLSelectElement.add.
  11621. * @author Curt Arnold
  11622. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14493106
  11623. */
  11624. HTMLSelectElement19: function(test) {
  11625. var success;
  11626. var nodeList;
  11627. var testNode;
  11628. var doc;
  11629. var optLength;
  11630. var selected;
  11631. var newOpt;
  11632. var newOptText;
  11633. var opt;
  11634. var optText;
  11635. var optValue;
  11636. var retNode;
  11637. var options;
  11638. var selectedNode;
  11639. var docRef = null;
  11640. if (typeof(this.doc) != 'undefined') {
  11641. docRef = this.doc;
  11642. }
  11643. doc = load("select");
  11644. nodeList = doc.getElementsByTagName("select");
  11645. test.equal(nodeList.length, 3, 'Asize');
  11646. testNode = nodeList.item(0);
  11647. newOpt = doc.createElement("option");
  11648. newOptText = doc.createTextNode("EMP31415");
  11649. retNode = newOpt.appendChild(newOptText);
  11650. options = testNode.options;
  11651. selectedNode = options.item(0);
  11652. testNode.add(newOpt,selectedNode);
  11653. optLength = testNode.length;
  11654. test.equal(optLength, 6, "optLength");
  11655. selected = testNode.selectedIndex;
  11656. test.equal(selected, 1, "selected");
  11657. options = testNode.options;
  11658. opt = options.item(0);
  11659. optText = opt.firstChild;
  11660. optValue = optText.nodeValue;
  11661. test.equal(optValue, "EMP31415", "lastValue");
  11662. test.done();
  11663. },
  11664. /**
  11665. *
  11666. Attempting to add an new option using HTMLSelectElement.add before a node that is not a child of the select
  11667. element should raise a NOT_FOUND_ERR.
  11668. * @author Curt Arnold
  11669. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-14493106
  11670. */
  11671. HTMLSelectElement20: function(test) {
  11672. var success;
  11673. var nodeList;
  11674. var testNode;
  11675. var doc;
  11676. var optLength;
  11677. var selected;
  11678. var newOpt;
  11679. var newOptText;
  11680. var retNode;
  11681. var options;
  11682. var otherSelect;
  11683. var selectedNode;
  11684. var docRef = null;
  11685. if (typeof(this.doc) != 'undefined') {
  11686. docRef = this.doc;
  11687. }
  11688. doc = load("select");
  11689. nodeList = doc.getElementsByTagName("select");
  11690. test.equal(nodeList.length, 3, 'Asize');
  11691. testNode = nodeList.item(0);
  11692. otherSelect = nodeList.item(1);
  11693. newOpt = doc.createElement("option");
  11694. newOptText = doc.createTextNode("EMP31415");
  11695. retNode = newOpt.appendChild(newOptText);
  11696. options = otherSelect.options;
  11697. selectedNode = options.item(0);
  11698. {
  11699. success = false;
  11700. try {
  11701. testNode.add(newOpt,selectedNode);
  11702. }
  11703. catch(ex) {
  11704. success = (typeof(ex.code) != 'undefined' && ex.code == 8);
  11705. }
  11706. test.ok(success, 'throw_NOT_FOUND_ERR');
  11707. }
  11708. test.done();
  11709. },
  11710. /**
  11711. *
  11712. The disabled attribute enables/disables the stylesheet.
  11713. Retrieve the disabled attribute and examine its value.
  11714. * @author NIST
  11715. * @author Mary Brady
  11716. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-51162010
  11717. */
  11718. HTMLStyleElement01: function(test) {
  11719. var success;
  11720. var nodeList;
  11721. var testNode;
  11722. var vdisabled;
  11723. var doc;
  11724. var docRef = null;
  11725. if (typeof(this.doc) != 'undefined') {
  11726. docRef = this.doc;
  11727. }
  11728. doc = load("style");
  11729. nodeList = doc.getElementsByTagName("style");
  11730. test.equal(nodeList.length, 1, 'Asize');
  11731. testNode = nodeList.item(0);
  11732. vdisabled = testNode.disabled;
  11733. test.equal(vdisabled, false, 'vdisabled should be *false*');
  11734. test.done();
  11735. },
  11736. /**
  11737. *
  11738. The media attribute identifies the intended medium of the style info.
  11739. Retrieve the media attribute and examine its value.
  11740. * @author NIST
  11741. * @author Mary Brady
  11742. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76412738
  11743. */
  11744. HTMLStyleElement02: function(test) {
  11745. var success;
  11746. var nodeList;
  11747. var testNode;
  11748. var vmedia;
  11749. var doc;
  11750. var docRef = null;
  11751. if (typeof(this.doc) != 'undefined') {
  11752. docRef = this.doc;
  11753. }
  11754. doc = load("style");
  11755. nodeList = doc.getElementsByTagName("style");
  11756. test.equal(nodeList.length, 1, 'Asize');
  11757. testNode = nodeList.item(0);
  11758. vmedia = testNode.media;
  11759. test.equal(vmedia, "screen", "mediaLink");
  11760. test.done();
  11761. },
  11762. /**
  11763. *
  11764. The type attribute specifies the style sheet language(Internet media type).
  11765. Retrieve the type attribute and examine its value.
  11766. * @author NIST
  11767. * @author Mary Brady
  11768. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22472002
  11769. */
  11770. HTMLStyleElement03: function(test) {
  11771. var success;
  11772. var nodeList;
  11773. var testNode;
  11774. var vtype;
  11775. var doc;
  11776. var docRef = null;
  11777. if (typeof(this.doc) != 'undefined') {
  11778. docRef = this.doc;
  11779. }
  11780. doc = load("style");
  11781. nodeList = doc.getElementsByTagName("style");
  11782. test.equal(nodeList.length, 1, 'Asize');
  11783. testNode = nodeList.item(0);
  11784. vtype = testNode.type;
  11785. test.equal(vtype, "text/css", "typeLink");
  11786. test.done();
  11787. },
  11788. /**
  11789. *
  11790. The align attribute specifies the caption alignment with respect to
  11791. the table.
  11792. Retrieve the align attribute and examine its value.
  11793. * @author NIST
  11794. * @author Mary Brady
  11795. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79875068
  11796. */
  11797. HTMLTableCaptionElement01: function(test) {
  11798. var success;
  11799. var nodeList;
  11800. var testNode;
  11801. var valign;
  11802. var doc;
  11803. var docRef = null;
  11804. if (typeof(this.doc) != 'undefined') {
  11805. docRef = this.doc;
  11806. }
  11807. doc = load("tablecaption");
  11808. nodeList = doc.getElementsByTagName("caption");
  11809. test.equal(nodeList.length, 1, 'Asize');
  11810. testNode = nodeList.item(0);
  11811. valign = testNode.align;
  11812. test.equal(valign, "top", "alignLink");
  11813. test.done();
  11814. },
  11815. /**
  11816. *
  11817. The cellIndex attribute specifies the index of this cell in the row(TH).
  11818. Retrieve the cellIndex attribute of the first TH element and examine its
  11819. value.
  11820. * @author NIST
  11821. * @author Mary Brady
  11822. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363
  11823. */
  11824. HTMLTableCellElement01: function(test) {
  11825. var success;
  11826. var nodeList;
  11827. var testNode;
  11828. var vcellindex;
  11829. var doc;
  11830. var docRef = null;
  11831. if (typeof(this.doc) != 'undefined') {
  11832. docRef = this.doc;
  11833. }
  11834. doc = load("tablecell");
  11835. nodeList = doc.getElementsByTagName("th");
  11836. test.equal(nodeList.length, 4, 'Asize');
  11837. testNode = nodeList.item(0);
  11838. vcellindex = testNode.cellIndex;
  11839. test.equal(vcellindex, 0, "cellIndexLink");
  11840. test.done();
  11841. },
  11842. /**
  11843. *
  11844. The cellIndex attribute specifies the index of this cell in the row(TD).
  11845. Retrieve the cellIndex attribute of the first TD element and examine its
  11846. value.
  11847. * @author NIST
  11848. * @author Mary Brady
  11849. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363
  11850. */
  11851. HTMLTableCellElement02: function(test) {
  11852. var success;
  11853. var nodeList;
  11854. var testNode;
  11855. var vcellindex;
  11856. var doc;
  11857. var docRef = null;
  11858. if (typeof(this.doc) != 'undefined') {
  11859. docRef = this.doc;
  11860. }
  11861. doc = load("tablecell");
  11862. nodeList = doc.getElementsByTagName("td");
  11863. test.equal(nodeList.length, 4, 'Asize');
  11864. testNode = nodeList.item(0);
  11865. vcellindex = testNode.cellIndex;
  11866. test.equal(vcellindex, 0, "cellIndexLink");
  11867. test.done();
  11868. },
  11869. /**
  11870. *
  11871. The abbr attribute specifies the abbreviation for table header cells(TH).
  11872. Retrieve the abbr attribute from the second TH element and examine
  11873. its value.
  11874. * @author NIST
  11875. * @author Mary Brady
  11876. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037
  11877. */
  11878. HTMLTableCellElement03: function(test) {
  11879. var success;
  11880. var nodeList;
  11881. var testNode;
  11882. var vabbr;
  11883. var doc;
  11884. var docRef = null;
  11885. if (typeof(this.doc) != 'undefined') {
  11886. docRef = this.doc;
  11887. }
  11888. doc = load("tablecell");
  11889. nodeList = doc.getElementsByTagName("th");
  11890. test.equal(nodeList.length, 4, 'Asize');
  11891. testNode = nodeList.item(1);
  11892. vabbr = testNode.abbr;
  11893. test.equal(vabbr, "hd1", "abbrLink");
  11894. test.done();
  11895. },
  11896. /**
  11897. *
  11898. The abbr attribute specifies the abbreviation for table data cells(TD).
  11899. Retrieve the abbr attribute from the second TD element and examine
  11900. its value.
  11901. * @author NIST
  11902. * @author Mary Brady
  11903. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037
  11904. */
  11905. HTMLTableCellElement04: function(test) {
  11906. var success;
  11907. var nodeList;
  11908. var testNode;
  11909. var vabbr;
  11910. var doc;
  11911. var docRef = null;
  11912. if (typeof(this.doc) != 'undefined') {
  11913. docRef = this.doc;
  11914. }
  11915. doc = load("tablecell");
  11916. nodeList = doc.getElementsByTagName("td");
  11917. test.equal(nodeList.length, 4, 'Asize');
  11918. testNode = nodeList.item(1);
  11919. vabbr = testNode.abbr;
  11920. test.equal(vabbr, "hd2", "abbrLink");
  11921. test.done();
  11922. },
  11923. /**
  11924. *
  11925. The align attribute specifies the horizontal alignment for table
  11926. header cells(TH).
  11927. Retrieve the align attribute from the second TH element and examine
  11928. its value.
  11929. * @author NIST
  11930. * @author Mary Brady
  11931. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879
  11932. */
  11933. HTMLTableCellElement05: function(test) {
  11934. var success;
  11935. var nodeList;
  11936. var testNode;
  11937. var valign;
  11938. var doc;
  11939. var docRef = null;
  11940. if (typeof(this.doc) != 'undefined') {
  11941. docRef = this.doc;
  11942. }
  11943. doc = load("tablecell");
  11944. nodeList = doc.getElementsByTagName("th");
  11945. test.equal(nodeList.length, 4, 'Asize');
  11946. testNode = nodeList.item(1);
  11947. valign = testNode.align;
  11948. test.equal(valign, "center", "alignLink");
  11949. test.done();
  11950. },
  11951. /**
  11952. *
  11953. The align attribute specifies the horizontal alignment for table
  11954. data cells(TD).
  11955. Retrieve the align attribute from the second TD element and examine
  11956. its value.
  11957. * @author NIST
  11958. * @author Mary Brady
  11959. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879
  11960. */
  11961. HTMLTableCellElement06: function(test) {
  11962. var success;
  11963. var nodeList;
  11964. var testNode;
  11965. var valign;
  11966. var doc;
  11967. var docRef = null;
  11968. if (typeof(this.doc) != 'undefined') {
  11969. docRef = this.doc;
  11970. }
  11971. doc = load("tablecell");
  11972. nodeList = doc.getElementsByTagName("td");
  11973. test.equal(nodeList.length, 4, 'Asize');
  11974. testNode = nodeList.item(1);
  11975. valign = testNode.align;
  11976. test.equal(valign, "center", "alignLink");
  11977. test.done();
  11978. },
  11979. /**
  11980. *
  11981. The axis attribute specifies the names group of related headers for table
  11982. header cells(TH).
  11983. Retrieve the align attribute from the second TH element and examine
  11984. its value.
  11985. * @author NIST
  11986. * @author Mary Brady
  11987. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418
  11988. */
  11989. HTMLTableCellElement07: function(test) {
  11990. var success;
  11991. var nodeList;
  11992. var testNode;
  11993. var vaxis;
  11994. var doc;
  11995. var docRef = null;
  11996. if (typeof(this.doc) != 'undefined') {
  11997. docRef = this.doc;
  11998. }
  11999. doc = load("tablecell");
  12000. nodeList = doc.getElementsByTagName("th");
  12001. test.equal(nodeList.length, 4, 'Asize');
  12002. testNode = nodeList.item(1);
  12003. vaxis = testNode.axis;
  12004. test.equal(vaxis, "center", "axisLink");
  12005. test.done();
  12006. },
  12007. /**
  12008. *
  12009. The axis attribute specifies the names group of related headers for table
  12010. data cells(TD).
  12011. Retrieve the axis attribute from the second TD element and examine
  12012. its value.
  12013. * @author NIST
  12014. * @author Mary Brady
  12015. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418
  12016. */
  12017. HTMLTableCellElement08: function(test) {
  12018. var success;
  12019. var nodeList;
  12020. var testNode;
  12021. var vaxis;
  12022. var doc;
  12023. var docRef = null;
  12024. if (typeof(this.doc) != 'undefined') {
  12025. docRef = this.doc;
  12026. }
  12027. doc = load("tablecell");
  12028. nodeList = doc.getElementsByTagName("td");
  12029. test.equal(nodeList.length, 4, 'Asize');
  12030. testNode = nodeList.item(1);
  12031. vaxis = testNode.axis;
  12032. test.equal(vaxis, "center", "axisLink");
  12033. test.done();
  12034. },
  12035. /**
  12036. *
  12037. The bgColor attribute specifies the cells background color for
  12038. table header cells(TH).
  12039. Retrieve the bgColor attribute from the second TH element and examine
  12040. its value.
  12041. * @author NIST
  12042. * @author Mary Brady
  12043. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431
  12044. */
  12045. HTMLTableCellElement09: function(test) {
  12046. var success;
  12047. var nodeList;
  12048. var testNode;
  12049. var vbgcolor;
  12050. var doc;
  12051. var docRef = null;
  12052. if (typeof(this.doc) != 'undefined') {
  12053. docRef = this.doc;
  12054. }
  12055. doc = load("tablecell");
  12056. nodeList = doc.getElementsByTagName("th");
  12057. test.equal(nodeList.length, 4, 'Asize');
  12058. testNode = nodeList.item(1);
  12059. vbgcolor = testNode.bgColor;
  12060. test.equal(vbgcolor.toLowerCase(), "#00FFFF".toLowerCase(), "bgColorLink");
  12061. test.done();
  12062. },
  12063. /**
  12064. *
  12065. The bgColor attribute specifies the cells background color for table
  12066. data cells(TD).
  12067. Retrieve the bgColor attribute from the second TD element and examine
  12068. its value.
  12069. * @author NIST
  12070. * @author Mary Brady
  12071. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431
  12072. */
  12073. HTMLTableCellElement10: function(test) {
  12074. var success;
  12075. var nodeList;
  12076. var testNode;
  12077. var vbgcolor;
  12078. var doc;
  12079. var docRef = null;
  12080. if (typeof(this.doc) != 'undefined') {
  12081. docRef = this.doc;
  12082. }
  12083. doc = load("tablecell");
  12084. nodeList = doc.getElementsByTagName("td");
  12085. test.equal(nodeList.length, 4, 'Asize');
  12086. testNode = nodeList.item(1);
  12087. vbgcolor = testNode.bgColor;
  12088. test.equal(vbgcolor.toLowerCase(), "#FF0000".toLowerCase(), "bgColorLink");
  12089. test.done();
  12090. },
  12091. /**
  12092. *
  12093. The char attribute specifies the alignment character for cells in a column
  12094. of table header cells(TH).
  12095. Retrieve the char attribute from the second TH element and examine
  12096. its value.
  12097. * @author NIST
  12098. * @author Mary Brady
  12099. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780
  12100. */
  12101. HTMLTableCellElement11: function(test) {
  12102. var success;
  12103. var nodeList;
  12104. var testNode;
  12105. var vch;
  12106. var doc;
  12107. var docRef = null;
  12108. if (typeof(this.doc) != 'undefined') {
  12109. docRef = this.doc;
  12110. }
  12111. doc = load("tablecell");
  12112. nodeList = doc.getElementsByTagName("th");
  12113. test.equal(nodeList.length, 4, 'Asize');
  12114. testNode = nodeList.item(1);
  12115. vch = testNode.ch;
  12116. test.equal(vch, ":", "chLink");
  12117. test.done();
  12118. },
  12119. /**
  12120. *
  12121. The char attribute specifies the alignment character for cells in a column
  12122. of table data cells(TD).
  12123. Retrieve the char attribute from the second TD element and examine
  12124. its value.
  12125. * @author NIST
  12126. * @author Mary Brady
  12127. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780
  12128. */
  12129. HTMLTableCellElement12: function(test) {
  12130. var success;
  12131. var nodeList;
  12132. var testNode;
  12133. var vch;
  12134. var doc;
  12135. var docRef = null;
  12136. if (typeof(this.doc) != 'undefined') {
  12137. docRef = this.doc;
  12138. }
  12139. doc = load("tablecell");
  12140. nodeList = doc.getElementsByTagName("td");
  12141. test.equal(nodeList.length, 4, 'Asize');
  12142. testNode = nodeList.item(1);
  12143. vch = testNode.ch;
  12144. test.equal(vch, ":", "chLink");
  12145. test.done();
  12146. },
  12147. /**
  12148. *
  12149. The charoff attribute specifies the offset of alignment characacter
  12150. of table header cells(TH).
  12151. Retrieve the charoff attribute from the second TH element and examine
  12152. its value.
  12153. * @author NIST
  12154. * @author Mary Brady
  12155. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310
  12156. */
  12157. HTMLTableCellElement13: function(test) {
  12158. var success;
  12159. var nodeList;
  12160. var testNode;
  12161. var vcharoff;
  12162. var doc;
  12163. var docRef = null;
  12164. if (typeof(this.doc) != 'undefined') {
  12165. docRef = this.doc;
  12166. }
  12167. doc = load("tablecell");
  12168. nodeList = doc.getElementsByTagName("th");
  12169. test.equal(nodeList.length, 4, 'Asize');
  12170. testNode = nodeList.item(1);
  12171. vcharoff = testNode.chOff;
  12172. test.equal(vcharoff, "1", "chOffLink");
  12173. test.done();
  12174. },
  12175. /**
  12176. *
  12177. The charoff attribute specifies the offset of alignment character
  12178. of table data cells(TD).
  12179. Retrieve the charoff attribute from the second TD element and examine
  12180. its value.
  12181. * @author NIST
  12182. * @author Mary Brady
  12183. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310
  12184. */
  12185. HTMLTableCellElement14: function(test) {
  12186. var success;
  12187. var nodeList;
  12188. var testNode;
  12189. var vcharoff;
  12190. var doc;
  12191. var docRef = null;
  12192. if (typeof(this.doc) != 'undefined') {
  12193. docRef = this.doc;
  12194. }
  12195. doc = load("tablecell");
  12196. nodeList = doc.getElementsByTagName("td");
  12197. test.equal(nodeList.length, 4, 'Asize');
  12198. testNode = nodeList.item(1);
  12199. vcharoff = testNode.chOff;
  12200. test.equal(vcharoff, "1", "chOffLink");
  12201. test.done();
  12202. },
  12203. /**
  12204. *
  12205. The colSpan attribute specifies the number of columns spanned by a table
  12206. header(TH) cell.
  12207. Retrieve the colspan attribute of the second TH element and examine its
  12208. value.
  12209. * @author NIST
  12210. * @author Mary Brady
  12211. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244
  12212. */
  12213. HTMLTableCellElement15: function(test) {
  12214. var success;
  12215. var nodeList;
  12216. var testNode;
  12217. var vcolspan;
  12218. var doc;
  12219. var docRef = null;
  12220. if (typeof(this.doc) != 'undefined') {
  12221. docRef = this.doc;
  12222. }
  12223. doc = load("tablecell");
  12224. nodeList = doc.getElementsByTagName("th");
  12225. test.equal(nodeList.length, 4, 'Asize');
  12226. testNode = nodeList.item(1);
  12227. vcolspan = testNode.colSpan;
  12228. test.equal(vcolspan, 1, "colSpanLink");
  12229. test.done();
  12230. },
  12231. /**
  12232. *
  12233. The colSpan attribute specifies the number of columns spanned by a
  12234. table data(TD) cell.
  12235. Retrieve the colSpan attribute of the second TD element and examine its
  12236. value.
  12237. * @author NIST
  12238. * @author Mary Brady
  12239. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244
  12240. */
  12241. HTMLTableCellElement16: function(test) {
  12242. var success;
  12243. var nodeList;
  12244. var testNode;
  12245. var vcolspan;
  12246. var doc;
  12247. var docRef = null;
  12248. if (typeof(this.doc) != 'undefined') {
  12249. docRef = this.doc;
  12250. }
  12251. doc = load("tablecell");
  12252. nodeList = doc.getElementsByTagName("td");
  12253. test.equal(nodeList.length, 4, 'Asize');
  12254. testNode = nodeList.item(1);
  12255. vcolspan = testNode.colSpan;
  12256. test.equal(vcolspan, 1, "colSpanLink");
  12257. test.done();
  12258. },
  12259. /**
  12260. *
  12261. The headers attribute specifies a list of id attribute values for
  12262. table header cells(TH).
  12263. Retrieve the headers attribute from the second TH element and examine
  12264. its value.
  12265. * @author NIST
  12266. * @author Mary Brady
  12267. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817
  12268. */
  12269. HTMLTableCellElement17: function(test) {
  12270. var success;
  12271. var nodeList;
  12272. var testNode;
  12273. var vheaders;
  12274. var doc;
  12275. var docRef = null;
  12276. if (typeof(this.doc) != 'undefined') {
  12277. docRef = this.doc;
  12278. }
  12279. doc = load("tablecell");
  12280. nodeList = doc.getElementsByTagName("th");
  12281. test.equal(nodeList.length, 4, 'Asize');
  12282. testNode = nodeList.item(1);
  12283. vheaders = testNode.headers;
  12284. test.equal(vheaders, "header-1", "headersLink");
  12285. test.done();
  12286. },
  12287. /**
  12288. *
  12289. The headers attribute specifies a list of id attribute values for
  12290. table data cells(TD).
  12291. Retrieve the headers attribute from the second TD element and examine
  12292. its value.
  12293. * @author NIST
  12294. * @author Mary Brady
  12295. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817
  12296. */
  12297. HTMLTableCellElement18: function(test) {
  12298. var success;
  12299. var nodeList;
  12300. var testNode;
  12301. var vheaders;
  12302. var doc;
  12303. var docRef = null;
  12304. if (typeof(this.doc) != 'undefined') {
  12305. docRef = this.doc;
  12306. }
  12307. doc = load("tablecell");
  12308. nodeList = doc.getElementsByTagName("td");
  12309. test.equal(nodeList.length, 4, 'Asize');
  12310. testNode = nodeList.item(1);
  12311. vheaders = testNode.headers;
  12312. test.equal(vheaders, "header-3", "headersLink");
  12313. test.done();
  12314. },
  12315. /**
  12316. *
  12317. The height attribute specifies the cell height.
  12318. Retrieve the height attribute from the second TH element and examine
  12319. its value.
  12320. * @author NIST
  12321. * @author Mary Brady
  12322. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212
  12323. */
  12324. HTMLTableCellElement19: function(test) {
  12325. var success;
  12326. var nodeList;
  12327. var testNode;
  12328. var vheight;
  12329. var doc;
  12330. var docRef = null;
  12331. if (typeof(this.doc) != 'undefined') {
  12332. docRef = this.doc;
  12333. }
  12334. doc = load("tablecell");
  12335. nodeList = doc.getElementsByTagName("th");
  12336. test.equal(nodeList.length, 4, 'Asize');
  12337. testNode = nodeList.item(1);
  12338. vheight = testNode.height;
  12339. test.equal(vheight, "50", "heightLink");
  12340. test.done();
  12341. },
  12342. /**
  12343. *
  12344. The height attribute specifies the cell height.
  12345. Retrieve the height attribute from the second TD element and examine
  12346. its value.
  12347. * @author NIST
  12348. * @author Mary Brady
  12349. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212
  12350. */
  12351. HTMLTableCellElement20: function(test) {
  12352. var success;
  12353. var nodeList;
  12354. var testNode;
  12355. var vheight;
  12356. var doc;
  12357. var docRef = null;
  12358. if (typeof(this.doc) != 'undefined') {
  12359. docRef = this.doc;
  12360. }
  12361. doc = load("tablecell");
  12362. nodeList = doc.getElementsByTagName("td");
  12363. test.equal(nodeList.length, 4, 'Asize');
  12364. testNode = nodeList.item(1);
  12365. vheight = testNode.height;
  12366. test.equal(vheight, "50", "heightLink");
  12367. test.done();
  12368. },
  12369. /**
  12370. *
  12371. The noWrap attribute supresses word wrapping.
  12372. Retrieve the noWrap attribute of the second TH Element and
  12373. examine its value.
  12374. * @author NIST
  12375. * @author Mary Brady
  12376. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045
  12377. */
  12378. HTMLTableCellElement21: function(test) {
  12379. var success;
  12380. var nodeList;
  12381. var testNode;
  12382. var vnowrap;
  12383. var doc;
  12384. var docRef = null;
  12385. if (typeof(this.doc) != 'undefined') {
  12386. docRef = this.doc;
  12387. }
  12388. doc = load("tablecell");
  12389. nodeList = doc.getElementsByTagName("th");
  12390. test.equal(nodeList.length, 4, 'Asize');
  12391. testNode = nodeList.item(1);
  12392. vnowrap = testNode.noWrap;
  12393. test.ok(vnowrap, 'noWrapLink');
  12394. test.done();
  12395. },
  12396. /**
  12397. *
  12398. The noWrap attribute supresses word wrapping.
  12399. Retrieve the noWrap attribute of the second TD Element and
  12400. examine its value.
  12401. * @author NIST
  12402. * @author Mary Brady
  12403. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045
  12404. */
  12405. HTMLTableCellElement22: function(test) {
  12406. var success;
  12407. var nodeList;
  12408. var testNode;
  12409. var vnowrap;
  12410. var doc;
  12411. var docRef = null;
  12412. if (typeof(this.doc) != 'undefined') {
  12413. docRef = this.doc;
  12414. }
  12415. doc = load("tablecell");
  12416. nodeList = doc.getElementsByTagName("td");
  12417. test.equal(nodeList.length, 4, 'Asize');
  12418. testNode = nodeList.item(1);
  12419. vnowrap = testNode.noWrap;
  12420. test.ok(vnowrap, 'noWrapLink');
  12421. test.done();
  12422. },
  12423. /**
  12424. *
  12425. The rowSpan attribute specifies the number of rows spanned by a table
  12426. header(TH) cell.
  12427. Retrieve the rowSpan attribute of the second TH element and examine its
  12428. value.
  12429. * @author NIST
  12430. * @author Mary Brady
  12431. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625
  12432. */
  12433. HTMLTableCellElement23: function(test) {
  12434. var success;
  12435. var nodeList;
  12436. var testNode;
  12437. var vrowspan;
  12438. var doc;
  12439. var docRef = null;
  12440. if (typeof(this.doc) != 'undefined') {
  12441. docRef = this.doc;
  12442. }
  12443. doc = load("tablecell");
  12444. nodeList = doc.getElementsByTagName("th");
  12445. test.equal(nodeList.length, 4, 'Asize');
  12446. testNode = nodeList.item(1);
  12447. vrowspan = testNode.rowSpan;
  12448. test.equal(vrowspan, 1, "rowSpanLink");
  12449. test.done();
  12450. },
  12451. /**
  12452. *
  12453. The rowSpan attribute specifies the number of rows spanned by a
  12454. table data(TD) cell.
  12455. Retrieve the rowSpan attribute of the second TD element and examine its
  12456. value.
  12457. * @author NIST
  12458. * @author Mary Brady
  12459. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625
  12460. */
  12461. HTMLTableCellElement24: function(test) {
  12462. var success;
  12463. var nodeList;
  12464. var testNode;
  12465. var vrowspan;
  12466. var doc;
  12467. var docRef = null;
  12468. if (typeof(this.doc) != 'undefined') {
  12469. docRef = this.doc;
  12470. }
  12471. doc = load("tablecell");
  12472. nodeList = doc.getElementsByTagName("td");
  12473. test.equal(nodeList.length, 4, 'Asize');
  12474. testNode = nodeList.item(1);
  12475. vrowspan = testNode.rowSpan;
  12476. test.equal(vrowspan, 1, "rowSpanLink");
  12477. test.done();
  12478. },
  12479. /**
  12480. *
  12481. The scope attribute specifies the scope covered by header cells.
  12482. Retrieve the scope attribute from the second TH element and examine
  12483. its value.
  12484. * @author NIST
  12485. * @author Mary Brady
  12486. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952
  12487. */
  12488. HTMLTableCellElement25: function(test) {
  12489. var success;
  12490. var nodeList;
  12491. var testNode;
  12492. var vscope;
  12493. var doc;
  12494. var docRef = null;
  12495. if (typeof(this.doc) != 'undefined') {
  12496. docRef = this.doc;
  12497. }
  12498. doc = load("tablecell");
  12499. nodeList = doc.getElementsByTagName("th");
  12500. test.equal(nodeList.length, 4, 'Asize');
  12501. testNode = nodeList.item(1);
  12502. vscope = testNode.scope;
  12503. test.equal(vscope, "col", "scopeLink");
  12504. test.done();
  12505. },
  12506. /**
  12507. *
  12508. The scope attribute specifies the scope covered by data cells.
  12509. Retrieve the scope attribute from the second TD element and examine
  12510. its value.
  12511. * @author NIST
  12512. * @author Mary Brady
  12513. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952
  12514. */
  12515. HTMLTableCellElement26: function(test) {
  12516. var success;
  12517. var nodeList;
  12518. var testNode;
  12519. var vscope;
  12520. var doc;
  12521. var docRef = null;
  12522. if (typeof(this.doc) != 'undefined') {
  12523. docRef = this.doc;
  12524. }
  12525. doc = load("tablecell");
  12526. nodeList = doc.getElementsByTagName("td");
  12527. test.equal(nodeList.length, 4, 'Asize');
  12528. testNode = nodeList.item(1);
  12529. vscope = testNode.scope;
  12530. test.equal(vscope, "col", "scopeLink");
  12531. test.done();
  12532. },
  12533. /**
  12534. *
  12535. The vAlign attribute specifies the vertical alignment of data in cell.
  12536. Retrieve the vAlign attribute from the second TH element and examine
  12537. its value.
  12538. * @author NIST
  12539. * @author Mary Brady
  12540. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221
  12541. */
  12542. HTMLTableCellElement27: function(test) {
  12543. var success;
  12544. var nodeList;
  12545. var testNode;
  12546. var vvalign;
  12547. var doc;
  12548. var docRef = null;
  12549. if (typeof(this.doc) != 'undefined') {
  12550. docRef = this.doc;
  12551. }
  12552. doc = load("tablecell");
  12553. nodeList = doc.getElementsByTagName("th");
  12554. test.equal(nodeList.length, 4, 'Asize');
  12555. testNode = nodeList.item(1);
  12556. vvalign = testNode.vAlign;
  12557. test.equal(vvalign, "middle", "vAlignLink");
  12558. test.done();
  12559. },
  12560. /**
  12561. *
  12562. The vAlign attribute specifies the vertical alignment of data in cell.
  12563. Retrieve the vAlign attribute from the second TD element and examine
  12564. its value.
  12565. * @author NIST
  12566. * @author Mary Brady
  12567. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221
  12568. */
  12569. HTMLTableCellElement28: function(test) {
  12570. var success;
  12571. var nodeList;
  12572. var testNode;
  12573. var vvalign;
  12574. var doc;
  12575. var docRef = null;
  12576. if (typeof(this.doc) != 'undefined') {
  12577. docRef = this.doc;
  12578. }
  12579. doc = load("tablecell");
  12580. nodeList = doc.getElementsByTagName("td");
  12581. test.equal(nodeList.length, 4, 'Asize');
  12582. testNode = nodeList.item(1);
  12583. vvalign = testNode.vAlign;
  12584. test.equal(vvalign, "middle", "vAlignLink");
  12585. test.done();
  12586. },
  12587. /**
  12588. *
  12589. The width attribute specifies the cells width.
  12590. Retrieve the width attribute from the second TH element and examine
  12591. its value.
  12592. * @author NIST
  12593. * @author Mary Brady
  12594. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795
  12595. */
  12596. HTMLTableCellElement29: function(test) {
  12597. var success;
  12598. var nodeList;
  12599. var testNode;
  12600. var vwidth;
  12601. var doc;
  12602. var docRef = null;
  12603. if (typeof(this.doc) != 'undefined') {
  12604. docRef = this.doc;
  12605. }
  12606. doc = load("tablecell");
  12607. nodeList = doc.getElementsByTagName("th");
  12608. test.equal(nodeList.length, 4, 'Asize');
  12609. testNode = nodeList.item(1);
  12610. vwidth = testNode.width;
  12611. test.equal(vwidth, "170", "widthLink");
  12612. test.done();
  12613. },
  12614. /**
  12615. *
  12616. The width attribute specifies the cells width.
  12617. Retrieve the width attribute from the second TD element and examine
  12618. its value.
  12619. * @author NIST
  12620. * @author Mary Brady
  12621. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795
  12622. */
  12623. HTMLTableCellElement30: function(test) {
  12624. var success;
  12625. var nodeList;
  12626. var testNode;
  12627. var vwidth;
  12628. var doc;
  12629. var docRef = null;
  12630. if (typeof(this.doc) != 'undefined') {
  12631. docRef = this.doc;
  12632. }
  12633. doc = load("tablecell");
  12634. nodeList = doc.getElementsByTagName("td");
  12635. test.equal(nodeList.length, 4, 'Asize');
  12636. testNode = nodeList.item(1);
  12637. vwidth = testNode.width;
  12638. test.equal(vwidth, "175", "widthLink");
  12639. test.done();
  12640. },
  12641. /**
  12642. *
  12643. The align attribute specifies the horizontal alignment of cell data
  12644. in column(COL).
  12645. Retrieve the align attribute from the COL element and examine
  12646. its value.
  12647. * @author NIST
  12648. * @author Mary Brady
  12649. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31128447
  12650. */
  12651. HTMLTableColElement01: function(test) {
  12652. var success;
  12653. var nodeList;
  12654. var testNode;
  12655. var valign;
  12656. var doc;
  12657. var docRef = null;
  12658. if (typeof(this.doc) != 'undefined') {
  12659. docRef = this.doc;
  12660. }
  12661. doc = load("tablecol");
  12662. nodeList = doc.getElementsByTagName("col");
  12663. test.equal(nodeList.length, 1, 'Asize');
  12664. testNode = nodeList.item(0);
  12665. valign = testNode.align;
  12666. test.equal(valign, "center", "alignLink");
  12667. test.done();
  12668. },
  12669. /**
  12670. *
  12671. The align attribute specifies the horizontal alignment of cell data
  12672. in column(COLGROUP).
  12673. Retrieve the align attribute from the COLGROUP element and examine
  12674. its value.
  12675. * @author NIST
  12676. * @author Mary Brady
  12677. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31128447
  12678. */
  12679. HTMLTableColElement02: function(test) {
  12680. var success;
  12681. var nodeList;
  12682. var testNode;
  12683. var valign;
  12684. var doc;
  12685. var docRef = null;
  12686. if (typeof(this.doc) != 'undefined') {
  12687. docRef = this.doc;
  12688. }
  12689. doc = load("tablecol");
  12690. nodeList = doc.getElementsByTagName("colgroup");
  12691. test.equal(nodeList.length, 1, 'Asize');
  12692. testNode = nodeList.item(0);
  12693. valign = testNode.align;
  12694. test.equal(valign, "center", "alignLink");
  12695. test.done();
  12696. },
  12697. /**
  12698. *
  12699. The char attribute specifies the alignment character for cells
  12700. in a column(COL).
  12701. Retrieve the char attribute from the COL element and examine
  12702. its value.
  12703. * @author NIST
  12704. * @author Mary Brady
  12705. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9447412
  12706. */
  12707. HTMLTableColElement03: function(test) {
  12708. var success;
  12709. var nodeList;
  12710. var testNode;
  12711. var vch;
  12712. var doc;
  12713. var docRef = null;
  12714. if (typeof(this.doc) != 'undefined') {
  12715. docRef = this.doc;
  12716. }
  12717. doc = load("tablecol");
  12718. nodeList = doc.getElementsByTagName("col");
  12719. test.equal(nodeList.length, 1, 'Asize');
  12720. testNode = nodeList.item(0);
  12721. vch = testNode.ch;
  12722. test.equal(vch, "*", "chLink");
  12723. test.done();
  12724. },
  12725. /**
  12726. *
  12727. The char attribute specifies the alignment character for cells
  12728. in a column(COLGROUP).
  12729. Retrieve the char attribute from the COLGROUP element and examine
  12730. its value.
  12731. * @author NIST
  12732. * @author Mary Brady
  12733. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9447412
  12734. */
  12735. HTMLTableColElement04: function(test) {
  12736. var success;
  12737. var nodeList;
  12738. var testNode;
  12739. var vch;
  12740. var doc;
  12741. var docRef = null;
  12742. if (typeof(this.doc) != 'undefined') {
  12743. docRef = this.doc;
  12744. }
  12745. doc = load("tablecol");
  12746. nodeList = doc.getElementsByTagName("colgroup");
  12747. test.equal(nodeList.length, 1, 'Asize');
  12748. testNode = nodeList.item(0);
  12749. vch = testNode.ch;
  12750. test.equal(vch, "$", "chLink");
  12751. test.done();
  12752. },
  12753. /**
  12754. *
  12755. The charoff attribute specifies offset of alignment character(COL).
  12756. Retrieve the charoff attribute from the COL element and examine
  12757. its value.
  12758. * @author NIST
  12759. * @author Mary Brady
  12760. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57779225
  12761. */
  12762. HTMLTableColElement05: function(test) {
  12763. var success;
  12764. var nodeList;
  12765. var testNode;
  12766. var vchoff;
  12767. var doc;
  12768. var docRef = null;
  12769. if (typeof(this.doc) != 'undefined') {
  12770. docRef = this.doc;
  12771. }
  12772. doc = load("tablecol");
  12773. nodeList = doc.getElementsByTagName("col");
  12774. test.equal(nodeList.length, 1, 'Asize');
  12775. testNode = nodeList.item(0);
  12776. vchoff = testNode.chOff;
  12777. test.equal(vchoff, "20", "chLink");
  12778. test.done();
  12779. },
  12780. /**
  12781. *
  12782. The charoff attribute specifies offset of alignment character(COLGROUP).
  12783. Retrieve the charoff attribute from the COLGROUP element and examine
  12784. its value.
  12785. * @author NIST
  12786. * @author Mary Brady
  12787. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57779225
  12788. */
  12789. HTMLTableColElement06: function(test) {
  12790. var success;
  12791. var nodeList;
  12792. var testNode;
  12793. var vchoff;
  12794. var doc;
  12795. var docRef = null;
  12796. if (typeof(this.doc) != 'undefined') {
  12797. docRef = this.doc;
  12798. }
  12799. doc = load("tablecol");
  12800. nodeList = doc.getElementsByTagName("colgroup");
  12801. test.equal(nodeList.length, 1, 'Asize');
  12802. testNode = nodeList.item(0);
  12803. vchoff = testNode.chOff;
  12804. test.equal(vchoff, "15", "chLink");
  12805. test.done();
  12806. },
  12807. /**
  12808. *
  12809. The span attribute indicates the number of columns in a group or affected
  12810. by a grouping(COL).
  12811. Retrieve the span attribute of the COL element and examine its
  12812. value.
  12813. * @author NIST
  12814. * @author Mary Brady
  12815. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335
  12816. */
  12817. HTMLTableColElement07: function(test) {
  12818. var success;
  12819. var nodeList;
  12820. var testNode;
  12821. var vspan;
  12822. var doc;
  12823. var docRef = null;
  12824. if (typeof(this.doc) != 'undefined') {
  12825. docRef = this.doc;
  12826. }
  12827. doc = load("tablecol");
  12828. nodeList = doc.getElementsByTagName("col");
  12829. test.equal(nodeList.length, 1, 'Asize');
  12830. testNode = nodeList.item(0);
  12831. vspan = testNode.span;
  12832. test.equal(vspan, 1, "spanLink");
  12833. test.done();
  12834. },
  12835. /**
  12836. *
  12837. The span attribute indicates the number of columns in a group or affected
  12838. by a grouping(COLGROUP).
  12839. Retrieve the span attribute of the COLGROUP element and examine its
  12840. value.
  12841. * @author NIST
  12842. * @author Mary Brady
  12843. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335
  12844. */
  12845. HTMLTableColElement08: function(test) {
  12846. var success;
  12847. var nodeList;
  12848. var testNode;
  12849. var vspan;
  12850. var doc;
  12851. var docRef = null;
  12852. if (typeof(this.doc) != 'undefined') {
  12853. docRef = this.doc;
  12854. }
  12855. doc = load("tablecol");
  12856. nodeList = doc.getElementsByTagName("colgroup");
  12857. test.equal(nodeList.length, 1, 'Asize');
  12858. testNode = nodeList.item(0);
  12859. vspan = testNode.span;
  12860. test.equal(vspan, 2, "spanLink");
  12861. test.done();
  12862. },
  12863. /**
  12864. *
  12865. The vAlign attribute specifies the vertical alignment of cell data
  12866. in column(COL).
  12867. Retrieve the vAlign attribute from the COL element and examine
  12868. its value.
  12869. * @author NIST
  12870. * @author Mary Brady
  12871. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710
  12872. */
  12873. HTMLTableColElement09: function(test) {
  12874. var success;
  12875. var nodeList;
  12876. var testNode;
  12877. var vvalign;
  12878. var doc;
  12879. var docRef = null;
  12880. if (typeof(this.doc) != 'undefined') {
  12881. docRef = this.doc;
  12882. }
  12883. doc = load("tablecol");
  12884. nodeList = doc.getElementsByTagName("col");
  12885. test.equal(nodeList.length, 1, 'Asize');
  12886. testNode = nodeList.item(0);
  12887. vvalign = testNode.vAlign;
  12888. test.equal(vvalign, "middle", "vAlignLink");
  12889. test.done();
  12890. },
  12891. /**
  12892. *
  12893. The vAlign attribute specifies the vertical alignment of cell data
  12894. in column(COLGROUP).
  12895. Retrieve the vAlign attribute from the COLGROUP element and examine
  12896. its value.
  12897. * @author NIST
  12898. * @author Mary Brady
  12899. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710
  12900. */
  12901. HTMLTableColElement10: function(test) {
  12902. var success;
  12903. var nodeList;
  12904. var testNode;
  12905. var vvalign;
  12906. var doc;
  12907. var docRef = null;
  12908. if (typeof(this.doc) != 'undefined') {
  12909. docRef = this.doc;
  12910. }
  12911. doc = load("tablecol");
  12912. nodeList = doc.getElementsByTagName("colgroup");
  12913. test.equal(nodeList.length, 1, 'Asize');
  12914. testNode = nodeList.item(0);
  12915. vvalign = testNode.vAlign;
  12916. test.equal(vvalign, "middle", "vAlignLink");
  12917. test.done();
  12918. },
  12919. /**
  12920. *
  12921. The width attribute specifies the default column width(COL).
  12922. Retrieve the width attribute from the COL element and examine
  12923. its value.
  12924. * @author NIST
  12925. * @author Mary Brady
  12926. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799
  12927. */
  12928. HTMLTableColElement11: function(test) {
  12929. var success;
  12930. var nodeList;
  12931. var testNode;
  12932. var vwidth;
  12933. var doc;
  12934. var docRef = null;
  12935. if (typeof(this.doc) != 'undefined') {
  12936. docRef = this.doc;
  12937. }
  12938. doc = load("tablecol");
  12939. nodeList = doc.getElementsByTagName("col");
  12940. test.equal(nodeList.length, 1, 'Asize');
  12941. testNode = nodeList.item(0);
  12942. vwidth = testNode.width;
  12943. test.equal(vwidth, "20", "widthLink");
  12944. test.done();
  12945. },
  12946. /**
  12947. *
  12948. The width attribute specifies the default column width(COLGORUP).
  12949. Retrieve the width attribute from the COLGROUP element and examine
  12950. its value.
  12951. * @author NIST
  12952. * @author Mary Brady
  12953. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799
  12954. */
  12955. HTMLTableColElement12: function(test) {
  12956. var success;
  12957. var nodeList;
  12958. var testNode;
  12959. var vwidth;
  12960. var doc;
  12961. var docRef = null;
  12962. if (typeof(this.doc) != 'undefined') {
  12963. docRef = this.doc;
  12964. }
  12965. doc = load("tablecol");
  12966. nodeList = doc.getElementsByTagName("colgroup");
  12967. test.equal(nodeList.length, 1, 'Asize');
  12968. testNode = nodeList.item(0);
  12969. vwidth = testNode.width;
  12970. test.equal(vwidth, "20", "widthLink");
  12971. test.done();
  12972. },
  12973. /**
  12974. *
  12975. The caption attribute returns the tables CAPTION.
  12976. Retrieve the align attribute of the CAPTION element from the second
  12977. TABLE element and examine its value.
  12978. * @author NIST
  12979. * @author Mary Brady
  12980. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520
  12981. */
  12982. HTMLTableElement01: function(test) {
  12983. var success;
  12984. var nodeList;
  12985. var testNode;
  12986. var vcaption;
  12987. var valign;
  12988. var doc;
  12989. var docRef = null;
  12990. if (typeof(this.doc) != 'undefined') {
  12991. docRef = this.doc;
  12992. }
  12993. doc = load("table");
  12994. nodeList = doc.getElementsByTagName("table");
  12995. test.equal(nodeList.length, 3, 'Asize');
  12996. testNode = nodeList.item(1);
  12997. vcaption = testNode.caption;
  12998. valign = vcaption.align;
  12999. test.equal(valign, "top", "alignLink");
  13000. test.done();
  13001. },
  13002. /**
  13003. *
  13004. The caption attribute returns the tables CAPTION or void if it does not
  13005. exist.
  13006. Retrieve the CAPTION element from within the first TABLE element.
  13007. Since one does not exist it should be void.
  13008. * @author NIST
  13009. * @author Mary Brady
  13010. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520
  13011. */
  13012. HTMLTableElement02: function(test) {
  13013. var success;
  13014. var nodeList;
  13015. var testNode;
  13016. var vcaption;
  13017. var doc;
  13018. var docRef = null;
  13019. if (typeof(this.doc) != 'undefined') {
  13020. docRef = this.doc;
  13021. }
  13022. doc = load("table");
  13023. nodeList = doc.getElementsByTagName("table");
  13024. test.equal(nodeList.length, 3, 'Asize');
  13025. testNode = nodeList.item(0);
  13026. vcaption = testNode.caption;
  13027. test.equal(vcaption, null, 'vcaption should be null');
  13028. test.done();
  13029. },
  13030. /**
  13031. *
  13032. The tHead attribute returns the tables THEAD.
  13033. Retrieve the align attribute of the THEAD element from the second
  13034. TABLE element and examine its value.
  13035. * @author NIST
  13036. * @author Mary Brady
  13037. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
  13038. */
  13039. HTMLTableElement03: function(test) {
  13040. var success;
  13041. var nodeList;
  13042. var testNode;
  13043. var vsection;
  13044. var valign;
  13045. var doc;
  13046. var docRef = null;
  13047. if (typeof(this.doc) != 'undefined') {
  13048. docRef = this.doc;
  13049. }
  13050. doc = load("table");
  13051. nodeList = doc.getElementsByTagName("table");
  13052. test.equal(nodeList.length, 3, 'Asize');
  13053. testNode = nodeList.item(1);
  13054. vsection = testNode.tHead;
  13055. valign = vsection.align;
  13056. test.equal(valign, "center", "alignLink");
  13057. test.done();
  13058. },
  13059. /**
  13060. *
  13061. The tHead attribute returns the tables THEAD or null if it does not
  13062. exist.
  13063. Retrieve the THEAD element from within the first TABLE element.
  13064. Since one does not exist it should be null.
  13065. * @author NIST
  13066. * @author Mary Brady
  13067. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
  13068. */
  13069. HTMLTableElement04: function(test) {
  13070. var success;
  13071. var nodeList;
  13072. var testNode;
  13073. var vsection;
  13074. var doc;
  13075. var docRef = null;
  13076. if (typeof(this.doc) != 'undefined') {
  13077. docRef = this.doc;
  13078. }
  13079. doc = load("table");
  13080. nodeList = doc.getElementsByTagName("table");
  13081. test.equal(nodeList.length, 3, 'Asize');
  13082. testNode = nodeList.item(0);
  13083. vsection = testNode.tHead;
  13084. test.equal(vsection, null, 'vsection should be null');
  13085. test.done();
  13086. },
  13087. /**
  13088. *
  13089. The tFoot attribute returns the tables TFOOT.
  13090. Retrieve the align attribute of the TFOOT element from the second
  13091. TABLE element and examine its value.
  13092. * @author NIST
  13093. * @author Mary Brady
  13094. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
  13095. */
  13096. HTMLTableElement05: function(test) {
  13097. var success;
  13098. var nodeList;
  13099. var testNode;
  13100. var vsection;
  13101. var valign;
  13102. var doc;
  13103. var docRef = null;
  13104. if (typeof(this.doc) != 'undefined') {
  13105. docRef = this.doc;
  13106. }
  13107. doc = load("table");
  13108. nodeList = doc.getElementsByTagName("table");
  13109. test.equal(nodeList.length, 3, 'Asize');
  13110. testNode = nodeList.item(1);
  13111. vsection = testNode.tFoot;
  13112. valign = vsection.align;
  13113. test.equal(valign, "center", "alignLink");
  13114. test.done();
  13115. },
  13116. /**
  13117. *
  13118. The tFoot attribute returns the tables TFOOT or null if it does not
  13119. exist.
  13120. Retrieve the TFOOT element from within the first TABLE element.
  13121. Since one does not exist it should be null.
  13122. * @author NIST
  13123. * @author Mary Brady
  13124. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
  13125. */
  13126. HTMLTableElement06: function(test) {
  13127. var success;
  13128. var nodeList;
  13129. var testNode;
  13130. var vsection;
  13131. var doc;
  13132. var docRef = null;
  13133. if (typeof(this.doc) != 'undefined') {
  13134. docRef = this.doc;
  13135. }
  13136. doc = load("table");
  13137. nodeList = doc.getElementsByTagName("table");
  13138. test.equal(nodeList.length, 3, 'Asize');
  13139. testNode = nodeList.item(0);
  13140. vsection = testNode.tFoot;
  13141. test.equal(vsection, null, 'vsection should be null');
  13142. test.done();
  13143. },
  13144. /**
  13145. *
  13146. The rows attribute returns a collection of all the rows in the table,
  13147. including al in THEAD, TFOOT, all TBODY elements.
  13148. Retrieve the rows attribute from the second TABLE element and
  13149. examine the items of the returned collection.
  13150. * @author NIST
  13151. * @author Mary Brady
  13152. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6156016
  13153. */
  13154. HTMLTableElement07: function(test) {
  13155. var expectedOptions = ['TR', 'TR' ,'TR' ,'TR'];
  13156. var doc = load("table");
  13157. var nodeList = doc.getElementsByTagName("table");
  13158. test.equal(nodeList.length, 3, 'Asize');
  13159. var rows = nodeList.item(1).rows;
  13160. var result = [];
  13161. for(var i=0;i<rows.length;i++) {
  13162. result.push(rows.item(i).nodeName);
  13163. }
  13164. test.deepEqual(result, expectedOptions, 'rowsLink');
  13165. test.done();
  13166. },
  13167. /**
  13168. *
  13169. The tBodies attribute returns a collection of all the defined
  13170. table bodies.
  13171. Retrieve the tBodies attribute from the second TABLE element and
  13172. examine the items of the returned collection.
  13173. * @author NIST
  13174. * @author Mary Brady
  13175. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63206416
  13176. */
  13177. HTMLTableElement08: function(test) {
  13178. var expectedOptions = ["TBODY"];
  13179. var doc = load("table");
  13180. var nodeList = doc.getElementsByTagName("table");
  13181. test.equal(nodeList.length, 3, 'Asize');
  13182. tbodies = nodeList.item(1).tBodies;
  13183. var result = [];
  13184. for(var i=0;i<tbodies.length;i++) {
  13185. result.push(tbodies.item(i).nodeName);
  13186. }
  13187. test.deepEqual(result, expectedOptions, 'tbodiesLink');
  13188. test.done();
  13189. },
  13190. /**
  13191. *
  13192. The tBodies attribute returns a collection of all the defined
  13193. table bodies.
  13194. Retrieve the tBodies attribute from the third TABLE element and
  13195. examine the items of the returned collection. Tests multiple TBODY
  13196. elements.
  13197. * @author NIST
  13198. * @author Mary Brady
  13199. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63206416
  13200. */
  13201. HTMLTableElement09: function(test) {
  13202. var expectedOptions = ['TBODY', 'TBODY', 'TBODY'];
  13203. var doc = load("table");
  13204. var nodeList = doc.getElementsByTagName("table");
  13205. test.equal(nodeList.length, 3, 'Asize');
  13206. var tbodies = nodeList.item(2).tBodies;
  13207. var result = [];
  13208. for(var i=0;i<tbodies.length;i++) {
  13209. result.push(tbodies.item(i).nodeName);
  13210. }
  13211. test.deepEqual(result, expectedOptions, 'tbodiesLink');
  13212. test.done();
  13213. },
  13214. /**
  13215. *
  13216. The align attribute specifies the table's position with respect to the
  13217. rest of the document.
  13218. Retrieve the align attribute of the first TABLE element and examine
  13219. its value.
  13220. * @author NIST
  13221. * @author Mary Brady
  13222. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23180977
  13223. */
  13224. HTMLTableElement10: function(test) {
  13225. var success;
  13226. var nodeList;
  13227. var testNode;
  13228. var valign;
  13229. var doc;
  13230. var docRef = null;
  13231. if (typeof(this.doc) != 'undefined') {
  13232. docRef = this.doc;
  13233. }
  13234. doc = load("table");
  13235. nodeList = doc.getElementsByTagName("table");
  13236. test.equal(nodeList.length, 3, 'Asize');
  13237. testNode = nodeList.item(0);
  13238. valign = testNode.align;
  13239. test.equal(valign, "center", "alignLink");
  13240. test.done();
  13241. },
  13242. /**
  13243. *
  13244. The bgColor attribute specifies cell background color.
  13245. Retrieve the bgColor attribute of the first TABLE element and examine
  13246. its value.
  13247. * @author NIST
  13248. * @author Mary Brady
  13249. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83532985
  13250. */
  13251. HTMLTableElement11: function(test) {
  13252. var success;
  13253. var nodeList;
  13254. var testNode;
  13255. var vbgcolor;
  13256. var doc;
  13257. var docRef = null;
  13258. if (typeof(this.doc) != 'undefined') {
  13259. docRef = this.doc;
  13260. }
  13261. doc = load("table");
  13262. nodeList = doc.getElementsByTagName("table");
  13263. test.equal(nodeList.length, 3, 'Asize');
  13264. testNode = nodeList.item(1);
  13265. vbgcolor = testNode.bgColor;
  13266. test.equal(vbgcolor, "#ff0000", "bgColorLink");
  13267. test.done();
  13268. },
  13269. /**
  13270. *
  13271. The border attribute specifies the width of the border around the table.
  13272. Retrieve the border attribute of the first TABLE element and examine
  13273. its value.
  13274. * @author NIST
  13275. * @author Mary Brady
  13276. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50969400
  13277. */
  13278. HTMLTableElement12: function(test) {
  13279. var success;
  13280. var nodeList;
  13281. var testNode;
  13282. var vborder;
  13283. var doc;
  13284. var docRef = null;
  13285. if (typeof(this.doc) != 'undefined') {
  13286. docRef = this.doc;
  13287. }
  13288. doc = load("table");
  13289. nodeList = doc.getElementsByTagName("table");
  13290. test.equal(nodeList.length, 3, 'Asize');
  13291. testNode = nodeList.item(1);
  13292. vborder = testNode.border;
  13293. test.equal(vborder, "4", "borderLink");
  13294. test.done();
  13295. },
  13296. /**
  13297. *
  13298. The cellpadding attribute specifies the horizontal and vertical space
  13299. between cell content and cell borders.
  13300. Retrieve the cellpadding attribute of the first TABLE element and examine
  13301. its value.
  13302. * @author NIST
  13303. * @author Mary Brady
  13304. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59162158
  13305. */
  13306. HTMLTableElement13: function(test) {
  13307. var success;
  13308. var nodeList;
  13309. var testNode;
  13310. var vcellpadding;
  13311. var doc;
  13312. var docRef = null;
  13313. if (typeof(this.doc) != 'undefined') {
  13314. docRef = this.doc;
  13315. }
  13316. doc = load("table");
  13317. nodeList = doc.getElementsByTagName("table");
  13318. test.equal(nodeList.length, 3, 'Asize');
  13319. testNode = nodeList.item(1);
  13320. vcellpadding = testNode.cellPadding;
  13321. test.equal(vcellpadding, "2", "cellPaddingLink");
  13322. test.done();
  13323. },
  13324. /**
  13325. *
  13326. The cellSpacing attribute specifies the horizontal and vertical separation
  13327. between cells.
  13328. Retrieve the cellSpacing attribute of the first TABLE element and examine
  13329. its value.
  13330. * @author NIST
  13331. * @author Mary Brady
  13332. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68907883
  13333. */
  13334. HTMLTableElement14: function(test) {
  13335. var success;
  13336. var nodeList;
  13337. var testNode;
  13338. var cellSpacing;
  13339. var doc;
  13340. var docRef = null;
  13341. if (typeof(this.doc) != 'undefined') {
  13342. docRef = this.doc;
  13343. }
  13344. doc = load("table");
  13345. nodeList = doc.getElementsByTagName("table");
  13346. test.equal(nodeList.length, 3, 'Asize');
  13347. testNode = nodeList.item(1);
  13348. cellSpacing = testNode.cellSpacing;
  13349. test.equal(cellSpacing, "2", "cellSpacingLink");
  13350. test.done();
  13351. },
  13352. /**
  13353. *
  13354. The frame attribute specifies which external table borders to render.
  13355. Retrieve the frame attribute of the first TABLE element and examine
  13356. its value.
  13357. * @author NIST
  13358. * @author Mary Brady
  13359. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64808476
  13360. */
  13361. HTMLTableElement15: function(test) {
  13362. var success;
  13363. var nodeList;
  13364. var testNode;
  13365. var vframe;
  13366. var doc;
  13367. var docRef = null;
  13368. if (typeof(this.doc) != 'undefined') {
  13369. docRef = this.doc;
  13370. }
  13371. doc = load("table");
  13372. nodeList = doc.getElementsByTagName("table");
  13373. test.equal(nodeList.length, 3, 'Asize');
  13374. testNode = nodeList.item(1);
  13375. vframe = testNode.frame;
  13376. test.equal(vframe, "border", "frameLink");
  13377. test.done();
  13378. },
  13379. /**
  13380. *
  13381. The rules attribute specifies which internal table borders to render.
  13382. Retrieve the rules attribute of the first TABLE element and examine
  13383. its value.
  13384. * @author NIST
  13385. * @author Mary Brady
  13386. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26347553
  13387. */
  13388. HTMLTableElement16: function(test) {
  13389. var success;
  13390. var nodeList;
  13391. var testNode;
  13392. var vrules;
  13393. var doc;
  13394. var docRef = null;
  13395. if (typeof(this.doc) != 'undefined') {
  13396. docRef = this.doc;
  13397. }
  13398. doc = load("table");
  13399. nodeList = doc.getElementsByTagName("table");
  13400. test.equal(nodeList.length, 3, 'Asize');
  13401. testNode = nodeList.item(1);
  13402. vrules = testNode.rules;
  13403. test.equal(vrules, "all", "rulesLink");
  13404. test.done();
  13405. },
  13406. /**
  13407. *
  13408. The summary attribute is a description about the purpose or structure
  13409. of a table.
  13410. Retrieve the summary attribute of the first TABLE element and examine
  13411. its value.
  13412. * @author NIST
  13413. * @author Mary Brady
  13414. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-44998528
  13415. */
  13416. HTMLTableElement17: function(test) {
  13417. var success;
  13418. var nodeList;
  13419. var testNode;
  13420. var vsummary;
  13421. var doc;
  13422. var docRef = null;
  13423. if (typeof(this.doc) != 'undefined') {
  13424. docRef = this.doc;
  13425. }
  13426. doc = load("table");
  13427. nodeList = doc.getElementsByTagName("table");
  13428. test.equal(nodeList.length, 3, 'Asize');
  13429. testNode = nodeList.item(1);
  13430. vsummary = testNode.summary;
  13431. test.equal(vsummary, "HTML Control Table", "summaryLink");
  13432. test.done();
  13433. },
  13434. /**
  13435. *
  13436. The width attribute specifies the desired table width.
  13437. Retrieve the width attribute of the first TABLE element and examine
  13438. its value.
  13439. * @author NIST
  13440. * @author Mary Brady
  13441. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77447361
  13442. */
  13443. HTMLTableElement18: function(test) {
  13444. var success;
  13445. var nodeList;
  13446. var testNode;
  13447. var vwidth;
  13448. var doc;
  13449. var docRef = null;
  13450. if (typeof(this.doc) != 'undefined') {
  13451. docRef = this.doc;
  13452. }
  13453. doc = load("table");
  13454. nodeList = doc.getElementsByTagName("table");
  13455. test.equal(nodeList.length, 3, 'Asize');
  13456. testNode = nodeList.item(1);
  13457. vwidth = testNode.width;
  13458. test.equal(vwidth, "680", "widthLink");
  13459. test.done();
  13460. },
  13461. /**
  13462. *
  13463. The createTHead() method creates a table header row or returns
  13464. an existing one.
  13465. Create a new THEAD element on the first TABLE element. The first
  13466. TABLE element should return null to make sure one doesn't exist.
  13467. After creation of the THEAD element the value is once again
  13468. checked and should not be null.
  13469. * @author NIST
  13470. * @author Rick Rivello
  13471. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70313345
  13472. */
  13473. HTMLTableElement19: function(test) {
  13474. var success;
  13475. var nodeList;
  13476. var testNode;
  13477. var vsection1;
  13478. var vsection2;
  13479. var newHead;
  13480. var doc;
  13481. var docRef = null;
  13482. if (typeof(this.doc) != 'undefined') {
  13483. docRef = this.doc;
  13484. }
  13485. doc = load("table");
  13486. nodeList = doc.getElementsByTagName("table");
  13487. test.equal(nodeList.length, 3, 'Asize');
  13488. testNode = nodeList.item(0);
  13489. vsection1 = testNode.tHead;
  13490. test.equal(vsection1, null, 'vsection1 should be null');
  13491. newHead = testNode.createTHead();
  13492. vsection2 = testNode.tHead;
  13493. test.notEqual(vsection2, null, 'vsection2 should not be null');
  13494. test.done();
  13495. },
  13496. /**
  13497. *
  13498. The createTHead() method creates a table header row or returns
  13499. an existing one.
  13500. Try to create a new THEAD element on the second TABLE element.
  13501. Since a THEAD element already exists in the TABLE element a new
  13502. THEAD element is not created and information from the already
  13503. existing THEAD element is returned.
  13504. * @author NIST
  13505. * @author Rick Rivello
  13506. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70313345
  13507. */
  13508. HTMLTableElement20: function(test) {
  13509. var success;
  13510. var nodeList;
  13511. var testNode;
  13512. var vsection;
  13513. var newHead;
  13514. var valign;
  13515. var doc;
  13516. var docRef = null;
  13517. if (typeof(this.doc) != 'undefined') {
  13518. docRef = this.doc;
  13519. }
  13520. doc = load("table");
  13521. nodeList = doc.getElementsByTagName("table");
  13522. test.equal(nodeList.length, 3, 'Asize');
  13523. testNode = nodeList.item(1);
  13524. newHead = testNode.createTHead();
  13525. vsection = testNode.tHead;
  13526. valign = vsection.align;
  13527. test.equal(valign, "center", "alignLink");
  13528. test.done();
  13529. },
  13530. /**
  13531. *
  13532. The deleteTHead() method deletes the header from the table.
  13533. The deleteTHead() method will delete the THEAD Element from the
  13534. second TABLE element. First make sure that the THEAD element exists
  13535. and then count the number of rows. After the THEAD element is
  13536. deleted there should be one less row.
  13537. * @author NIST
  13538. * @author Rick Rivello
  13539. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38310198
  13540. */
  13541. HTMLTableElement21: function(test) {
  13542. var success;
  13543. var nodeList;
  13544. var rowsnodeList;
  13545. var testNode;
  13546. var vsection1;
  13547. var vsection2;
  13548. var vrows;
  13549. var doc;
  13550. var result = new Array();
  13551. expectedResult = new Array();
  13552. expectedResult[0] = 4;
  13553. expectedResult[1] = 3;
  13554. var docRef = null;
  13555. if (typeof(this.doc) != 'undefined') {
  13556. docRef = this.doc;
  13557. }
  13558. doc = load("table");
  13559. nodeList = doc.getElementsByTagName("table");
  13560. test.equal(nodeList.length, 3, 'Asize');
  13561. testNode = nodeList.item(1);
  13562. vsection1 = testNode.tHead;
  13563. test.notEqual(vsection1, null, 'vsection1 should not be null');
  13564. rowsnodeList = testNode.rows;
  13565. vrows = rowsnodeList.length;
  13566. result[result.length] = vrows;
  13567. testNode.deleteTHead();
  13568. vsection2 = testNode.tHead;
  13569. rowsnodeList = testNode.rows;
  13570. vrows = rowsnodeList.length;
  13571. result[result.length] = vrows;
  13572. test.deepEqual(result, expectedResult, 'rowsLink');
  13573. test.done();
  13574. },
  13575. /**
  13576. *
  13577. The createTFoot() method creates a table footer row or returns
  13578. an existing one.
  13579. Create a new TFOOT element on the first TABLE element. The first
  13580. TABLE element should return null to make sure one doesn't exist.
  13581. After creation of the TFOOT element the value is once again
  13582. checked and should not be null.
  13583. * @author NIST
  13584. * @author Rick Rivello
  13585. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8453710
  13586. */
  13587. HTMLTableElement22: function(test) {
  13588. var success;
  13589. var nodeList;
  13590. var testNode;
  13591. var vsection1;
  13592. var vsection2;
  13593. var newFoot;
  13594. var doc;
  13595. var docRef = null;
  13596. if (typeof(this.doc) != 'undefined') {
  13597. docRef = this.doc;
  13598. }
  13599. doc = load("table");
  13600. nodeList = doc.getElementsByTagName("table");
  13601. test.equal(nodeList.length, 3, 'Asize');
  13602. testNode = nodeList.item(0);
  13603. vsection1 = testNode.tFoot;
  13604. test.equal(vsection1, null, 'vsection1 should be null');
  13605. newFoot = testNode.createTFoot();
  13606. vsection2 = testNode.tFoot;
  13607. test.notEqual(vsection2, null, 'vsection2 should not be null');
  13608. test.done();
  13609. },
  13610. /**
  13611. *
  13612. The createTFoot() method creates a table footer row or returns
  13613. an existing one.
  13614. Try to create a new TFOOT element on the second TABLE element.
  13615. Since a TFOOT element already exists in the TABLE element a new
  13616. TFOOT element is not created and information from the already
  13617. existing TFOOT element is returned.
  13618. * @author NIST
  13619. * @author Rick Rivello
  13620. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8453710
  13621. */
  13622. HTMLTableElement23: function(test) {
  13623. var success;
  13624. var nodeList;
  13625. var testNode;
  13626. var vsection;
  13627. var newFoot;
  13628. var valign;
  13629. var doc;
  13630. var docRef = null;
  13631. if (typeof(this.doc) != 'undefined') {
  13632. docRef = this.doc;
  13633. }
  13634. doc = load("table");
  13635. nodeList = doc.getElementsByTagName("table");
  13636. test.equal(nodeList.length, 3, 'Asize');
  13637. testNode = nodeList.item(1);
  13638. newFoot = testNode.createTFoot();
  13639. vsection = testNode.tFoot;
  13640. valign = vsection.align;
  13641. test.equal(valign, "center", "alignLink");
  13642. test.done();
  13643. },
  13644. /**
  13645. *
  13646. The deleteTFoot() method deletes the footer from the table.
  13647. The deleteTFoot() method will delete the TFOOT Element from the
  13648. second TABLE element. First make sure that the TFOOT element exists
  13649. and then count the number of rows. After the TFOOT element is
  13650. deleted there should be one less row.
  13651. * @author NIST
  13652. * @author Rick Rivello
  13653. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78363258
  13654. */
  13655. HTMLTableElement24: function(test) {
  13656. var success;
  13657. var nodeList;
  13658. var rowsnodeList;
  13659. var testNode;
  13660. var vsection1;
  13661. var vsection2;
  13662. var vrows;
  13663. var doc;
  13664. var result = new Array();
  13665. expectedResult = new Array();
  13666. expectedResult[0] = 4;
  13667. expectedResult[1] = 3;
  13668. var docRef = null;
  13669. if (typeof(this.doc) != 'undefined') {
  13670. docRef = this.doc;
  13671. }
  13672. doc = load("table");
  13673. nodeList = doc.getElementsByTagName("table");
  13674. test.equal(nodeList.length, 3, 'Asize');
  13675. testNode = nodeList.item(1);
  13676. vsection1 = testNode.tFoot;
  13677. test.notEqual(vsection1, null, 'vsection1 should not be null');
  13678. rowsnodeList = testNode.rows;
  13679. vrows = rowsnodeList.length;
  13680. result[result.length] = vrows;
  13681. testNode.deleteTFoot();
  13682. vsection2 = testNode.tFoot;
  13683. rowsnodeList = testNode.rows;
  13684. vrows = rowsnodeList.length;
  13685. result[result.length] = vrows;
  13686. test.deepEqual(result, expectedResult, 'rowsLink');
  13687. test.done();
  13688. },
  13689. /**
  13690. *
  13691. The createCaption() method creates a new table caption object or returns
  13692. an existing one.
  13693. Create a new CAPTION element on the first TABLE element. Since
  13694. one does not currently exist the CAPTION element is created.
  13695. * @author NIST
  13696. * @author Rick Rivello
  13697. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96920263
  13698. */
  13699. HTMLTableElement25: function(test) {
  13700. var success;
  13701. var nodeList;
  13702. var testNode;
  13703. var vsection1;
  13704. var vsection2;
  13705. var newCaption;
  13706. var doc;
  13707. var docRef = null;
  13708. if (typeof(this.doc) != 'undefined') {
  13709. docRef = this.doc;
  13710. }
  13711. doc = load("table");
  13712. nodeList = doc.getElementsByTagName("table");
  13713. test.equal(nodeList.length, 3, 'Asize');
  13714. testNode = nodeList.item(0);
  13715. vsection1 = testNode.caption;
  13716. test.equal(vsection1, null, 'vsection1 should be null');
  13717. newCaption = testNode.createCaption();
  13718. vsection2 = testNode.caption;
  13719. test.notEqual(vsection2, null, 'vsection2 should not be null');
  13720. test.done();
  13721. },
  13722. /**
  13723. *
  13724. The createCaption() method creates a new table caption object or returns
  13725. an existing one.
  13726. Create a new CAPTION element on the first TABLE element. Since
  13727. one currently exists the CAPTION element is not created and you
  13728. can get the align attribute from the CAPTION element that exists.
  13729. * @author NIST
  13730. * @author Rick Rivello
  13731. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96920263
  13732. */
  13733. HTMLTableElement26: function(test) {
  13734. var success;
  13735. var nodeList;
  13736. var testNode;
  13737. var vsection1;
  13738. var vcaption;
  13739. var newCaption;
  13740. var valign;
  13741. var doc;
  13742. var docRef = null;
  13743. if (typeof(this.doc) != 'undefined') {
  13744. docRef = this.doc;
  13745. }
  13746. doc = load("table");
  13747. nodeList = doc.getElementsByTagName("table");
  13748. test.equal(nodeList.length, 3, 'Asize');
  13749. testNode = nodeList.item(1);
  13750. vsection1 = testNode.caption;
  13751. test.notEqual(vsection1, null, 'vsection1 should not be null');
  13752. newCaption = testNode.createCaption();
  13753. vcaption = testNode.caption;
  13754. valign = vcaption.align;
  13755. test.equal(valign, "top", "alignLink");
  13756. test.done();
  13757. },
  13758. /**
  13759. *
  13760. The deleteCaption() method deletes the table caption.
  13761. Delete the CAPTION element on the second TABLE element.
  13762. * @author NIST
  13763. * @author Rick Rivello
  13764. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22930071
  13765. */
  13766. HTMLTableElement27: function(test) {
  13767. var success;
  13768. var nodeList;
  13769. var testNode;
  13770. var vsection1;
  13771. var vsection2;
  13772. var valign;
  13773. var doc;
  13774. var docRef = null;
  13775. if (typeof(this.doc) != 'undefined') {
  13776. docRef = this.doc;
  13777. }
  13778. doc = load("table");
  13779. nodeList = doc.getElementsByTagName("table");
  13780. test.equal(nodeList.length, 3, 'Asize');
  13781. testNode = nodeList.item(1);
  13782. vsection1 = testNode.caption;
  13783. test.notEqual(vsection1, null, 'vsection1 should not be null');
  13784. testNode.deleteCaption();
  13785. vsection2 = testNode.caption;
  13786. test.equal(vsection2, null, 'vsection2 should be null');
  13787. test.done();
  13788. },
  13789. /**
  13790. *
  13791. The insertRow() method inserts a new empty table row.
  13792. Retrieve the second TABLE element and invoke the insertRow() method
  13793. with an index of 0. Currently the zero indexed row is in the THEAD
  13794. section of the TABLE. The number of rows in the THEAD section before
  13795. insertion of the new row is one. After the new row is inserted the number
  13796. of rows in the THEAD section is two.
  13797. * @author NIST
  13798. * @author Rick Rivello
  13799. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903
  13800. */
  13801. HTMLTableElement28: function(test) {
  13802. var success;
  13803. var nodeList;
  13804. var testNode;
  13805. var newRow;
  13806. var rowsnodeList;
  13807. var vsection1;
  13808. var vsection2;
  13809. var vrows;
  13810. var doc;
  13811. var docRef = null;
  13812. if (typeof(this.doc) != 'undefined') {
  13813. docRef = this.doc;
  13814. }
  13815. doc = load("table");
  13816. nodeList = doc.getElementsByTagName("table");
  13817. test.equal(nodeList.length, 3, 'Asize');
  13818. testNode = nodeList.item(1);
  13819. vsection1 = testNode.tHead;
  13820. rowsnodeList = vsection1.rows;
  13821. vrows = rowsnodeList.length;
  13822. test.equal(vrows, 1, "rowsLink1");
  13823. newRow = testNode.insertRow(0);
  13824. vsection2 = testNode.tHead;
  13825. rowsnodeList = vsection2.rows;
  13826. vrows = rowsnodeList.length;
  13827. test.equal(vrows, 2, "rowsLink2");
  13828. test.done();
  13829. },
  13830. /**
  13831. *
  13832. The insertRow() method inserts a new empty table row.
  13833. Retrieve the second TABLE element and invoke the insertRow() method
  13834. with an index of two. Currently the 2nd indexed row is in the TBODY
  13835. section of the TABLE. The number of rows in the TBODY section before
  13836. insertion of the new row is two. After the new row is inserted the number
  13837. of rows in the TBODY section is three.
  13838. * @author NIST
  13839. * @author Rick Rivello
  13840. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903
  13841. */
  13842. HTMLTableElement29: function(test) {
  13843. var success;
  13844. var nodeList;
  13845. var tbodiesnodeList;
  13846. var testNode;
  13847. var bodyNode;
  13848. var newRow;
  13849. var rowsnodeList;
  13850. var vsection1;
  13851. var vsection2;
  13852. var vrows;
  13853. var doc;
  13854. var docRef = null;
  13855. if (typeof(this.doc) != 'undefined') {
  13856. docRef = this.doc;
  13857. }
  13858. doc = load("table");
  13859. nodeList = doc.getElementsByTagName("table");
  13860. test.equal(nodeList.length, 3, 'Asize');
  13861. testNode = nodeList.item(1);
  13862. tbodiesnodeList = testNode.tBodies;
  13863. bodyNode = tbodiesnodeList.item(0);
  13864. rowsnodeList = bodyNode.rows;
  13865. vrows = rowsnodeList.length;
  13866. test.equal(vrows, 2, "rowsLink1");
  13867. newRow = testNode.insertRow(2);
  13868. tbodiesnodeList = testNode.tBodies;
  13869. bodyNode = tbodiesnodeList.item(0);
  13870. rowsnodeList = bodyNode.rows;
  13871. vrows = rowsnodeList.length;
  13872. test.equal(vrows, 3, "rowsLink2");
  13873. test.done();
  13874. },
  13875. /**
  13876. *
  13877. The insertRow() method inserts a new empty table row.
  13878. Retrieve the second TABLE element and invoke the insertRow() method
  13879. with an index of four. After the new row is inserted the number of rows
  13880. in the table should be five.
  13881. Also the number of rows in the TFOOT section before
  13882. insertion of the new row is one. After the new row is inserted the number
  13883. of rows in the TFOOT section is two.
  13884. * @author NIST
  13885. * @author Rick Rivello
  13886. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903
  13887. */
  13888. HTMLTableElement30: function(test) {
  13889. var success;
  13890. var nodeList;
  13891. var tbodiesnodeList;
  13892. var testNode;
  13893. var newRow;
  13894. var rowsnodeList;
  13895. var vsection1;
  13896. var vrows;
  13897. var doc;
  13898. var docRef = null;
  13899. if (typeof(this.doc) != 'undefined') {
  13900. docRef = this.doc;
  13901. }
  13902. doc = load("table");
  13903. nodeList = doc.getElementsByTagName("table");
  13904. test.equal(nodeList.length, 3, 'Asize');
  13905. testNode = nodeList.item(1);
  13906. rowsnodeList = testNode.rows;
  13907. vrows = rowsnodeList.length;
  13908. test.equal(vrows, 4, "rowsLink1");
  13909. vsection1 = testNode.tFoot;
  13910. rowsnodeList = vsection1.rows;
  13911. vrows = rowsnodeList.length;
  13912. test.equal(vrows, 1, "rowsLink");
  13913. newRow = testNode.insertRow(4);
  13914. rowsnodeList = testNode.rows;
  13915. vrows = rowsnodeList.length;
  13916. test.equal(vrows, 5, "rowsLink2");
  13917. vsection1 = testNode.tFoot;
  13918. rowsnodeList = vsection1.rows;
  13919. vrows = rowsnodeList.length;
  13920. test.equal(vrows, 2, "rowsLink3");
  13921. test.done();
  13922. },
  13923. /**
  13924. *
  13925. The insertRow() method inserts a new empty table row. In addition, when
  13926. the table is empty the row is inserted into a TBODY which is created
  13927. and inserted into the table.
  13928. Load the table1 file which has a non-empty table element.
  13929. Create an empty TABLE element and append to the document.
  13930. Check to make sure that the empty TABLE element doesn't
  13931. have a TBODY element. Insert a new row into the empty
  13932. TABLE element. Check for existence of the a TBODY element
  13933. in the table.
  13934. * @author NIST
  13935. * @author Rick Rivello
  13936. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903
  13937. * @see http://lists.w3.org/Archives/Public/www-dom-ts/2002Aug/0019.html
  13938. * @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=502
  13939. */
  13940. HTMLTableElement31: function(test) {
  13941. var success;
  13942. var nodeList;
  13943. var testNode;
  13944. var tableNode;
  13945. var tbodiesnodeList;
  13946. var newRow;
  13947. var doc;
  13948. var table;
  13949. var tbodiesLength;
  13950. var docRef = null;
  13951. if (typeof(this.doc) != 'undefined') {
  13952. docRef = this.doc;
  13953. }
  13954. doc = load("table1");
  13955. nodeList = doc.getElementsByTagName("body");
  13956. test.equal(nodeList.length, 1, 'tableSize1');
  13957. testNode = nodeList.item(0);
  13958. table = doc.createElement("table");
  13959. tableNode = testNode.appendChild(table);
  13960. nodeList = doc.getElementsByTagName("table");
  13961. test.equal(nodeList.length, 2, 'tableSize2');
  13962. tbodiesnodeList = tableNode.tBodies;
  13963. tbodiesLength = tbodiesnodeList.length;
  13964. test.equal(tbodiesLength, 0, "Asize3");
  13965. newRow = tableNode.insertRow(0);
  13966. tbodiesnodeList = tableNode.tBodies;
  13967. tbodiesLength = tbodiesnodeList.length;
  13968. test.equal(tbodiesLength, 1, "Asize4");
  13969. test.done();
  13970. },
  13971. /**
  13972. *
  13973. The deleteRow() method deletes a table row.
  13974. Retrieve the second TABLE element and invoke the deleteRow() method
  13975. with an index of 0(first row). Currently there are four rows in the
  13976. table. After the deleteRow() method is called there should be
  13977. three rows in the table.
  13978. * @author NIST
  13979. * @author Rick Rivello
  13980. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13114938
  13981. */
  13982. HTMLTableElement32: function(test) {
  13983. var success;
  13984. var nodeList;
  13985. var testNode;
  13986. var rowsnodeList;
  13987. var vrows;
  13988. var doc;
  13989. var docRef = null;
  13990. if (typeof(this.doc) != 'undefined') {
  13991. docRef = this.doc;
  13992. }
  13993. doc = load("table");
  13994. nodeList = doc.getElementsByTagName("table");
  13995. test.equal(nodeList.length, 3, 'Asize');
  13996. testNode = nodeList.item(1);
  13997. rowsnodeList = testNode.rows;
  13998. vrows = rowsnodeList.length;
  13999. test.equal(vrows, 4, "rowsLink1");
  14000. testNode.deleteRow(0);
  14001. rowsnodeList = testNode.rows;
  14002. vrows = rowsnodeList.length;
  14003. test.equal(vrows, 3, "rowsLink2");
  14004. test.done();
  14005. },
  14006. /**
  14007. *
  14008. The deleteRow() method deletes a table row.
  14009. Retrieve the second TABLE element and invoke the deleteRow() method
  14010. with an index of 3(last row). Currently there are four rows in the
  14011. table. The deleteRow() method is called and now there should be three.
  14012. * @author NIST
  14013. * @author Rick Rivello
  14014. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13114938
  14015. */
  14016. HTMLTableElement33: function(test) {
  14017. var success;
  14018. var nodeList;
  14019. var testNode;
  14020. var rowsnodeList;
  14021. var vrows;
  14022. var doc;
  14023. var docRef = null;
  14024. if (typeof(this.doc) != 'undefined') {
  14025. docRef = this.doc;
  14026. }
  14027. doc = load("table");
  14028. nodeList = doc.getElementsByTagName("table");
  14029. test.equal(nodeList.length, 3, 'Asize');
  14030. testNode = nodeList.item(1);
  14031. rowsnodeList = testNode.rows;
  14032. vrows = rowsnodeList.length;
  14033. test.equal(vrows, 4, "rowsLink1");
  14034. testNode.deleteRow(3);
  14035. rowsnodeList = testNode.rows;
  14036. vrows = rowsnodeList.length;
  14037. test.equal(vrows, 3, "rowsLink2");
  14038. test.done();
  14039. },
  14040. /**
  14041. *
  14042. The insertRow() method throws a INDEX_SIZE_ERR DOMException
  14043. if the specified index is greater than the number of rows.
  14044. Retrieve the second TABLE element which has four rows. Try
  14045. to insert a new row using an index of five. This should throw
  14046. a INDEX_SIZE_ERR DOMException since there are only four rows.
  14047. * @author NIST
  14048. * @author Rick Rivello
  14049. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903
  14050. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-39872903')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14051. */
  14052. HTMLTableElement34: function(test) {
  14053. var success;
  14054. var nodeList;
  14055. var testNode;
  14056. var newRow;
  14057. var doc;
  14058. var docRef = null;
  14059. if (typeof(this.doc) != 'undefined') {
  14060. docRef = this.doc;
  14061. }
  14062. doc = load("table");
  14063. nodeList = doc.getElementsByTagName("table");
  14064. test.equal(nodeList.length, 3, 'Asize');
  14065. testNode = nodeList.item(1);
  14066. {
  14067. success = false;
  14068. try {
  14069. newRow = testNode.insertRow(5);
  14070. }
  14071. catch(ex) {
  14072. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14073. }
  14074. test.ok(success, 'HTMLTableElement34');
  14075. }
  14076. test.done();
  14077. },
  14078. /**
  14079. *
  14080. The insertRow() method throws a INDEX_SIZE_ERR DOMException
  14081. if the specified index is negative.
  14082. Retrieve the second TABLE element which has four rows. Try
  14083. to insert a new row using an index of negative five. This should throw
  14084. a INDEX_SIZE_ERR DOMException since the index is negative.
  14085. * @author NIST
  14086. * @author Rick Rivello
  14087. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903
  14088. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-39872903')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14089. */
  14090. HTMLTableElement35: function(test) {
  14091. var success;
  14092. var nodeList;
  14093. var testNode;
  14094. var newRow;
  14095. var doc;
  14096. var docRef = null;
  14097. if (typeof(this.doc) != 'undefined') {
  14098. docRef = this.doc;
  14099. }
  14100. doc = load("table");
  14101. nodeList = doc.getElementsByTagName("table");
  14102. test.equal(nodeList.length, 3, 'Asize');
  14103. testNode = nodeList.item(1);
  14104. {
  14105. success = false;
  14106. try {
  14107. newRow = testNode.insertRow(-5);
  14108. }
  14109. catch(ex) {
  14110. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14111. }
  14112. test.ok(success, 'HTMLTableElement35');
  14113. }
  14114. test.done();
  14115. },
  14116. /**
  14117. *
  14118. The deleteRow() method throws a INDEX_SIZE_ERR DOMException
  14119. if the specified index is greater than the number of rows.
  14120. Retrieve the second TABLE element which has four rows. Try
  14121. to delete a new row using an index of five. This should throw
  14122. a INDEX_SIZE_ERR DOMException since there are only four rows.
  14123. * @author NIST
  14124. * @author Rick Rivello
  14125. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938
  14126. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-13114938')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14127. */
  14128. HTMLTableElement36: function(test) {
  14129. var success;
  14130. var nodeList;
  14131. var testNode;
  14132. var doc;
  14133. var docRef = null;
  14134. if (typeof(this.doc) != 'undefined') {
  14135. docRef = this.doc;
  14136. }
  14137. doc = load("table");
  14138. nodeList = doc.getElementsByTagName("table");
  14139. test.equal(nodeList.length, 3, 'Asize');
  14140. testNode = nodeList.item(1);
  14141. {
  14142. success = false;
  14143. try {
  14144. testNode.deleteRow(5);
  14145. }
  14146. catch(ex) {
  14147. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14148. }
  14149. test.ok(success, 'HTMLTableElement36');
  14150. }
  14151. test.done();
  14152. },
  14153. /**
  14154. *
  14155. The deleteRow() method throws a INDEX_SIZE_ERR DOMException
  14156. if the specified index is equal the number of rows.
  14157. Retrieve the second TABLE element which has four rows. Try
  14158. to delete a new row using an index of four. This should throw
  14159. a INDEX_SIZE_ERR DOMException since the index is equal to the
  14160. number of rows.
  14161. * @author NIST
  14162. * @author Rick Rivello
  14163. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938
  14164. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-13114938')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14165. */
  14166. HTMLTableElement37: function(test) {
  14167. var success;
  14168. var nodeList;
  14169. var testNode;
  14170. var doc;
  14171. var docRef = null;
  14172. if (typeof(this.doc) != 'undefined') {
  14173. docRef = this.doc;
  14174. }
  14175. doc = load("table");
  14176. nodeList = doc.getElementsByTagName("table");
  14177. test.equal(nodeList.length, 3, 'Asize');
  14178. testNode = nodeList.item(1);
  14179. {
  14180. success = false;
  14181. try {
  14182. testNode.deleteRow(4);
  14183. }
  14184. catch(ex) {
  14185. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14186. }
  14187. test.ok(success, 'HTMLTableElement37');
  14188. }
  14189. test.done();
  14190. },
  14191. /**
  14192. *
  14193. The deleteRow() method throws a INDEX_SIZE_ERR DOMException
  14194. if the specified index is negative.
  14195. Retrieve the second TABLE element which has four rows. Try
  14196. to delete a new row using an index of negative five. This should throw
  14197. a INDEX_SIZE_ERR DOMException since the index is negative.
  14198. * @author NIST
  14199. * @author Rick Rivello
  14200. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938
  14201. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-13114938')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14202. */
  14203. HTMLTableElement38: function(test) {
  14204. var success;
  14205. var nodeList;
  14206. var testNode;
  14207. var doc;
  14208. var docRef = null;
  14209. if (typeof(this.doc) != 'undefined') {
  14210. docRef = this.doc;
  14211. }
  14212. doc = load("table");
  14213. nodeList = doc.getElementsByTagName("table");
  14214. test.equal(nodeList.length, 3, 'Asize');
  14215. testNode = nodeList.item(1);
  14216. {
  14217. success = false;
  14218. try {
  14219. testNode.deleteRow(-5);
  14220. }
  14221. catch(ex) {
  14222. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14223. }
  14224. test.ok(success, 'HTMLTableElement38');
  14225. }
  14226. test.done();
  14227. },
  14228. /**
  14229. *
  14230. The insertRow() method inserts a new empty table row.
  14231. If index is -1 or equal to the number of rows, the new row
  14232. is appended.
  14233. Retrieve the second TABLE element and invoke the insertRow() method
  14234. with an index of negative one.
  14235. The number of rows in the TBODY section before insertion with an index
  14236. of negative one is two. After the new row is inserted the number
  14237. of rows in the TBODY section is three.
  14238. * @author NIST
  14239. * @author Rick Rivello
  14240. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903
  14241. */
  14242. HTMLTableElement39: function(test) {
  14243. var success;
  14244. var nodeList;
  14245. var tbodiesnodeList;
  14246. var testNode;
  14247. var bodyNode;
  14248. var newRow;
  14249. var rowsnodeList;
  14250. var vsection1;
  14251. var vsection2;
  14252. var vrows;
  14253. var doc;
  14254. var docRef = null;
  14255. if (typeof(this.doc) != 'undefined') {
  14256. docRef = this.doc;
  14257. }
  14258. doc = load("table");
  14259. nodeList = doc.getElementsByTagName("table");
  14260. test.equal(nodeList.length, 3, 'Asize');
  14261. testNode = nodeList.item(1);
  14262. tbodiesnodeList = testNode.tBodies;
  14263. bodyNode = tbodiesnodeList.item(0);
  14264. rowsnodeList = bodyNode.rows;
  14265. vrows = rowsnodeList.length;
  14266. test.equal(vrows, 2, "rowsLink1");
  14267. newRow = testNode.insertRow(-1);
  14268. tbodiesnodeList = testNode.tBodies;
  14269. bodyNode = tbodiesnodeList.item(0);
  14270. rowsnodeList = bodyNode.rows;
  14271. vrows = rowsnodeList.length;
  14272. test.equal(vrows, 3, "rowsLink2");
  14273. test.done();
  14274. },
  14275. /**
  14276. *
  14277. The deleteRow() method deletes a table row. If the index is -1
  14278. the last row of the table is deleted.
  14279. Retrieve the second TABLE element and invoke the deleteRow() method
  14280. with an index of negative one. Currently there are four rows in the
  14281. table. The deleteRow() method is called and now there should be three.
  14282. * @author NIST
  14283. * @author Rick Rivello
  14284. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938
  14285. */
  14286. HTMLTableElement40: function(test) {
  14287. var success;
  14288. var nodeList;
  14289. var testNode;
  14290. var rowsnodeList;
  14291. var vrows;
  14292. var doc;
  14293. var docRef = null;
  14294. if (typeof(this.doc) != 'undefined') {
  14295. docRef = this.doc;
  14296. }
  14297. doc = load("table");
  14298. nodeList = doc.getElementsByTagName("table");
  14299. test.equal(nodeList.length, 3, 'Asize');
  14300. testNode = nodeList.item(1);
  14301. rowsnodeList = testNode.rows;
  14302. vrows = rowsnodeList.length;
  14303. test.equal(vrows, 4, "rowsLink1");
  14304. testNode.deleteRow(-1);
  14305. rowsnodeList = testNode.rows;
  14306. vrows = rowsnodeList.length;
  14307. test.equal(vrows, 3, "rowsLink2");
  14308. test.done();
  14309. },
  14310. /**
  14311. *
  14312. The rowIndex attribute specifies the index of the row, relative to the
  14313. entire table, starting from 0. This is in document tree order and
  14314. not display order. The rowIndex does not take into account sections
  14315. (THEAD, TFOOT, or TBODY) within the table.
  14316. Retrieve the third TR element within the document and examine
  14317. its rowIndex value.
  14318. * @author NIST
  14319. * @author Mary Brady
  14320. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67347567
  14321. */
  14322. HTMLTableRowElement01: function(test) {
  14323. var success;
  14324. var nodeList;
  14325. var testNode;
  14326. var vrowindex;
  14327. var doc;
  14328. var docRef = null;
  14329. if (typeof(this.doc) != 'undefined') {
  14330. docRef = this.doc;
  14331. }
  14332. doc = load("tablerow");
  14333. nodeList = doc.getElementsByTagName("tr");
  14334. test.equal(nodeList.length, 5, 'Asize');
  14335. testNode = nodeList.item(3);
  14336. vrowindex = testNode.rowIndex;
  14337. test.equal(vrowindex, 1, "rowIndexLink");
  14338. test.done();
  14339. },
  14340. /**
  14341. *
  14342. The sectionRowIndex attribute specifies the index of this row, relative
  14343. to the current section(THEAD, TFOOT, or TBODY),starting from 0.
  14344. Retrieve the second TR(1st In THEAD) element within the document and
  14345. examine its sectionRowIndex value.
  14346. * @author NIST
  14347. * @author Mary Brady
  14348. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901
  14349. */
  14350. HTMLTableRowElement02: function(test) {
  14351. var success;
  14352. var nodeList;
  14353. var testNode;
  14354. var vsectionrowindex;
  14355. var doc;
  14356. var docRef = null;
  14357. if (typeof(this.doc) != 'undefined') {
  14358. docRef = this.doc;
  14359. }
  14360. doc = load("tablerow");
  14361. nodeList = doc.getElementsByTagName("tr");
  14362. test.equal(nodeList.length, 5, 'Asize');
  14363. testNode = nodeList.item(1);
  14364. vsectionrowindex = testNode.sectionRowIndex;
  14365. test.equal(vsectionrowindex, 0, "sectionRowIndexLink");
  14366. test.done();
  14367. },
  14368. /**
  14369. *
  14370. The sectionRowIndex attribute specifies the index of this row, relative
  14371. to the current section(THEAD, TFOOT, or TBODY),starting from 0.
  14372. Retrieve the third TR(1st In TFOOT) element within the document and
  14373. examine its sectionRowIndex value.
  14374. * @author NIST
  14375. * @author Mary Brady
  14376. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901
  14377. */
  14378. HTMLTableRowElement03: function(test) {
  14379. var success;
  14380. var nodeList;
  14381. var testNode;
  14382. var vsectionrowindex;
  14383. var doc;
  14384. var docRef = null;
  14385. if (typeof(this.doc) != 'undefined') {
  14386. docRef = this.doc;
  14387. }
  14388. doc = load("tablerow");
  14389. nodeList = doc.getElementsByTagName("tr");
  14390. test.equal(nodeList.length, 5, 'Asize');
  14391. testNode = nodeList.item(2);
  14392. vsectionrowindex = testNode.sectionRowIndex;
  14393. test.equal(vsectionrowindex, 0, "sectionRowIndexLink");
  14394. test.done();
  14395. },
  14396. /**
  14397. *
  14398. The sectionRowIndex attribute specifies the index of this row, relative
  14399. to the current section(THEAD, TFOOT, or TBODY),starting from 0.
  14400. Retrieve the fifth TR(2nd In TBODY) element within the document and
  14401. examine its sectionRowIndex value.
  14402. * @author NIST
  14403. * @author Mary Brady
  14404. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901
  14405. */
  14406. HTMLTableRowElement04: function(test) {
  14407. var success;
  14408. var nodeList;
  14409. var testNode;
  14410. var vsectionrowindex;
  14411. var doc;
  14412. var docRef = null;
  14413. if (typeof(this.doc) != 'undefined') {
  14414. docRef = this.doc;
  14415. }
  14416. doc = load("tablerow");
  14417. nodeList = doc.getElementsByTagName("tr");
  14418. test.equal(nodeList.length, 5, 'Asize');
  14419. testNode = nodeList.item(4);
  14420. vsectionrowindex = testNode.sectionRowIndex;
  14421. test.equal(vsectionrowindex, 1, "sectionRowIndexLink");
  14422. test.done();
  14423. },
  14424. /**
  14425. *
  14426. The cells attribute specifies the collection of cells in this row.
  14427. Retrieve the fourth TR element and examine the value of
  14428. the cells length attribute.
  14429. * @author NIST
  14430. * @author Mary Brady
  14431. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67349879
  14432. */
  14433. HTMLTableRowElement05: function(test) {
  14434. var success;
  14435. var nodeList;
  14436. var cellsnodeList;
  14437. var testNode;
  14438. var vcells;
  14439. var doc;
  14440. var docRef = null;
  14441. if (typeof(this.doc) != 'undefined') {
  14442. docRef = this.doc;
  14443. }
  14444. doc = load("tablerow");
  14445. nodeList = doc.getElementsByTagName("tr");
  14446. test.equal(nodeList.length, 5, 'Asize');
  14447. testNode = nodeList.item(3);
  14448. cellsnodeList = testNode.cells;
  14449. vcells = cellsnodeList.length;
  14450. test.equal(vcells, 6, "cellsLink");
  14451. test.done();
  14452. },
  14453. /**
  14454. *
  14455. The align attribute specifies the horizontal alignment of data within
  14456. cells of this row.
  14457. Retrieve the align attribute of the second TR element and examine
  14458. its value.
  14459. * @author NIST
  14460. * @author Mary Brady
  14461. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257
  14462. */
  14463. HTMLTableRowElement06: function(test) {
  14464. var success;
  14465. var nodeList;
  14466. var testNode;
  14467. var valign;
  14468. var doc;
  14469. var docRef = null;
  14470. if (typeof(this.doc) != 'undefined') {
  14471. docRef = this.doc;
  14472. }
  14473. doc = load("tablerow");
  14474. nodeList = doc.getElementsByTagName("tr");
  14475. test.equal(nodeList.length, 5, 'Asize');
  14476. testNode = nodeList.item(1);
  14477. valign = testNode.align;
  14478. test.equal(valign, "center", "alignLink");
  14479. test.done();
  14480. },
  14481. /**
  14482. *
  14483. The bgColor attribute specifies the background color of rows.
  14484. Retrieve the bgColor attribute of the second TR element and examine
  14485. its value.
  14486. * @author NIST
  14487. * @author Mary Brady
  14488. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18161327
  14489. */
  14490. HTMLTableRowElement07: function(test) {
  14491. var success;
  14492. var nodeList;
  14493. var testNode;
  14494. var vbgcolor;
  14495. var doc;
  14496. var docRef = null;
  14497. if (typeof(this.doc) != 'undefined') {
  14498. docRef = this.doc;
  14499. }
  14500. doc = load("tablerow");
  14501. nodeList = doc.getElementsByTagName("tr");
  14502. test.equal(nodeList.length, 5, 'Asize');
  14503. testNode = nodeList.item(1);
  14504. vbgcolor = testNode.bgColor;
  14505. test.equal(vbgcolor.toLowerCase(), "#00FFFF".toLowerCase(), "bgColorLink");
  14506. test.done();
  14507. },
  14508. /**
  14509. *
  14510. The ch attribute specifies the alignment character for cells in a column.
  14511. Retrieve the char attribute of the second TR element and examine
  14512. its value.
  14513. * @author NIST
  14514. * @author Mary Brady
  14515. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502
  14516. */
  14517. HTMLTableRowElement08: function(test) {
  14518. var success;
  14519. var nodeList;
  14520. var testNode;
  14521. var vch;
  14522. var doc;
  14523. var docRef = null;
  14524. if (typeof(this.doc) != 'undefined') {
  14525. docRef = this.doc;
  14526. }
  14527. doc = load("tablerow");
  14528. nodeList = doc.getElementsByTagName("tr");
  14529. test.equal(nodeList.length, 5, 'Asize');
  14530. testNode = nodeList.item(1);
  14531. vch = testNode.ch;
  14532. test.equal(vch, "*", "chLink");
  14533. test.done();
  14534. },
  14535. /**
  14536. *
  14537. The chOff attribute specifies the offset of alignment character.
  14538. Retrieve the charoff attribute of the second TR element and examine
  14539. its value.
  14540. * @author NIST
  14541. * @author Mary Brady
  14542. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461
  14543. */
  14544. HTMLTableRowElement09: function(test) {
  14545. var success;
  14546. var nodeList;
  14547. var testNode;
  14548. var vchoff;
  14549. var doc;
  14550. var docRef = null;
  14551. if (typeof(this.doc) != 'undefined') {
  14552. docRef = this.doc;
  14553. }
  14554. doc = load("tablerow");
  14555. nodeList = doc.getElementsByTagName("tr");
  14556. test.equal(nodeList.length, 5, 'Asize');
  14557. testNode = nodeList.item(1);
  14558. vchoff = testNode.chOff;
  14559. test.equal(vchoff, "1", "charOffLink");
  14560. test.done();
  14561. },
  14562. /**
  14563. *
  14564. The vAlign attribute specifies the vertical alignment of data within
  14565. cells of this row.
  14566. Retrieve the vAlign attribute of the second TR element and examine
  14567. its value.
  14568. * @author NIST
  14569. * @author Mary Brady
  14570. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90000058
  14571. */
  14572. HTMLTableRowElement10: function(test) {
  14573. var success;
  14574. var nodeList;
  14575. var testNode;
  14576. var vvalign;
  14577. var doc;
  14578. var docRef = null;
  14579. if (typeof(this.doc) != 'undefined') {
  14580. docRef = this.doc;
  14581. }
  14582. doc = load("tablerow");
  14583. nodeList = doc.getElementsByTagName("tr");
  14584. test.equal(nodeList.length, 5, 'Asize');
  14585. testNode = nodeList.item(1);
  14586. vvalign = testNode.vAlign;
  14587. test.equal(vvalign, "middle", "vAlignLink");
  14588. test.done();
  14589. },
  14590. /**
  14591. *
  14592. The insertCell() method inserts an empty TD cell into this row.
  14593. Retrieve the fourth TR element and examine the value of
  14594. the cells length attribute which should be set to six.
  14595. Check the value of the first TD element. Invoke the
  14596. insertCell() which will create an empty TD cell at the
  14597. zero index position. Check the value of the newly created
  14598. cell and make sure it is null and also the numbers of cells
  14599. should now be seven.
  14600. * @author NIST
  14601. * @author Rick Rivello
  14602. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68927016
  14603. */
  14604. HTMLTableRowElement11: function(test) {
  14605. var success;
  14606. var nodeList;
  14607. var cellsnodeList;
  14608. var testNode;
  14609. var trNode;
  14610. var cellNode;
  14611. var value;
  14612. var newCell;
  14613. var vcells;
  14614. var doc;
  14615. var docRef = null;
  14616. if (typeof(this.doc) != 'undefined') {
  14617. docRef = this.doc;
  14618. }
  14619. doc = load("tablerow");
  14620. nodeList = doc.getElementsByTagName("tr");
  14621. test.equal(nodeList.length, 5, 'Asize');
  14622. testNode = nodeList.item(3);
  14623. cellsnodeList = testNode.cells;
  14624. vcells = cellsnodeList.length;
  14625. test.equal(vcells, 6, "cellsLink1");
  14626. trNode = cellsnodeList.item(0);
  14627. cellNode = trNode.firstChild;
  14628. value = cellNode.nodeValue;
  14629. test.equal(value, "EMP0001", "value1Link");
  14630. newCell = testNode.insertCell(0);
  14631. testNode = nodeList.item(3);
  14632. cellsnodeList = testNode.cells;
  14633. vcells = cellsnodeList.length;
  14634. test.equal(vcells, 7, "cellsLink2");
  14635. trNode = cellsnodeList.item(0);
  14636. cellNode = trNode.firstChild;
  14637. test.equal(cellNode, null, 'cellNode should be null');
  14638. test.done();
  14639. },
  14640. /**
  14641. *
  14642. The insertCell() method inserts an empty TD cell into this row.
  14643. Retrieve the fourth TR element and examine the value of
  14644. the cells length attribute which should be set to six.
  14645. Check the value of the last TD element. Invoke the
  14646. insertCell() which will append the empty cell to the end of the list.
  14647. Check the value of the newly created cell and make sure it is null
  14648. and also the numbers of cells should now be seven.
  14649. * @author NIST
  14650. * @author Rick Rivello
  14651. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68927016
  14652. */
  14653. HTMLTableRowElement12: function(test) {
  14654. var success;
  14655. var nodeList;
  14656. var cellsnodeList;
  14657. var testNode;
  14658. var trNode;
  14659. var cellNode;
  14660. var value;
  14661. var newCell;
  14662. var vcells;
  14663. var doc;
  14664. var docRef = null;
  14665. if (typeof(this.doc) != 'undefined') {
  14666. docRef = this.doc;
  14667. }
  14668. doc = load("tablerow");
  14669. nodeList = doc.getElementsByTagName("tr");
  14670. test.equal(nodeList.length, 5, 'Asize');
  14671. testNode = nodeList.item(3);
  14672. cellsnodeList = testNode.cells;
  14673. vcells = cellsnodeList.length;
  14674. test.equal(vcells, 6, "cellsLink1");
  14675. trNode = cellsnodeList.item(5);
  14676. cellNode = trNode.firstChild;
  14677. value = cellNode.nodeValue;
  14678. test.equal(value, "1230 North Ave. Dallas, Texas 98551", "value1Link");
  14679. newCell = testNode.insertCell(6);
  14680. testNode = nodeList.item(3);
  14681. cellsnodeList = testNode.cells;
  14682. vcells = cellsnodeList.length;
  14683. test.equal(vcells, 7, "cellsLink2");
  14684. trNode = cellsnodeList.item(6);
  14685. cellNode = trNode.firstChild;
  14686. test.equal(cellNode, null, 'cellNode should be null');
  14687. test.done();
  14688. },
  14689. /**
  14690. *
  14691. The deleteCell() method deletes a cell from the current row.
  14692. Retrieve the fourth TR element and examine the value of
  14693. the cells length attribute which should be set to six.
  14694. Check the value of the first TD element. Invoke the
  14695. deleteCell() method which will delete a cell from the current row.
  14696. Check the value of the cell at the zero index and also check
  14697. the number of cells which should now be five.
  14698. * @author NIST
  14699. * @author Rick Rivello
  14700. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11738598
  14701. */
  14702. HTMLTableRowElement13: function(test) {
  14703. var success;
  14704. var nodeList;
  14705. var cellsnodeList;
  14706. var testNode;
  14707. var trNode;
  14708. var cellNode;
  14709. var value;
  14710. var vcells;
  14711. var doc;
  14712. var docRef = null;
  14713. if (typeof(this.doc) != 'undefined') {
  14714. docRef = this.doc;
  14715. }
  14716. doc = load("tablerow");
  14717. nodeList = doc.getElementsByTagName("tr");
  14718. test.equal(nodeList.length, 5, 'Asize');
  14719. testNode = nodeList.item(3);
  14720. cellsnodeList = testNode.cells;
  14721. vcells = cellsnodeList.length;
  14722. test.equal(vcells, 6, "cellsLink1");
  14723. trNode = cellsnodeList.item(0);
  14724. cellNode = trNode.firstChild;
  14725. value = cellNode.nodeValue;
  14726. test.equal(value, "EMP0001", "value1Link");
  14727. testNode.deleteCell(0);
  14728. testNode = nodeList.item(3);
  14729. cellsnodeList = testNode.cells;
  14730. vcells = cellsnodeList.length;
  14731. test.equal(vcells, 5, "cellsLink2");
  14732. trNode = cellsnodeList.item(0);
  14733. cellNode = trNode.firstChild;
  14734. value = cellNode.nodeValue;
  14735. test.equal(value, "Margaret Martin", "value2Link");
  14736. test.done();
  14737. },
  14738. /**
  14739. *
  14740. The deleteCell() method deletes a cell from the current row.
  14741. Retrieve the fourth TR element and examine the value of
  14742. the cells length attribute which should be set to six.
  14743. Check the value of the third(index 2) TD element. Invoke the
  14744. deleteCell() method which will delete a cell from the current row.
  14745. Check the value of the third cell(index 2) and also check
  14746. the number of cells which should now be five.
  14747. * @author NIST
  14748. * @author Rick Rivello
  14749. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11738598
  14750. */
  14751. HTMLTableRowElement14: function(test) {
  14752. var success;
  14753. var nodeList;
  14754. var cellsnodeList;
  14755. var testNode;
  14756. var trNode;
  14757. var cellNode;
  14758. var value;
  14759. var vcells;
  14760. var doc;
  14761. var docRef = null;
  14762. if (typeof(this.doc) != 'undefined') {
  14763. docRef = this.doc;
  14764. }
  14765. doc = load("tablerow");
  14766. nodeList = doc.getElementsByTagName("tr");
  14767. test.equal(nodeList.length, 5, 'Asize');
  14768. testNode = nodeList.item(3);
  14769. cellsnodeList = testNode.cells;
  14770. vcells = cellsnodeList.length;
  14771. test.equal(vcells, 6, "cellsLink1");
  14772. trNode = cellsnodeList.item(2);
  14773. cellNode = trNode.firstChild;
  14774. value = cellNode.nodeValue;
  14775. test.equal(value, "Accountant", "value1Link");
  14776. testNode.deleteCell(2);
  14777. testNode = nodeList.item(3);
  14778. cellsnodeList = testNode.cells;
  14779. vcells = cellsnodeList.length;
  14780. test.equal(vcells, 5, "cellsLink2");
  14781. trNode = cellsnodeList.item(2);
  14782. cellNode = trNode.firstChild;
  14783. value = cellNode.nodeValue;
  14784. test.equal(value, "56,000", "value2Link");
  14785. test.done();
  14786. },
  14787. /**
  14788. *
  14789. The insertCell() method throws a INDEX_SIZE_ERR DOMException
  14790. if the specified index is greater than the number of cells.
  14791. Retrieve the fourth TR element which has six cells. Try
  14792. to insert a cell using an index of seven. This should throw
  14793. a INDEX_SIZE_ERR DOMException since there are only six cells.
  14794. * @author NIST
  14795. * @author Rick Rivello
  14796. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016
  14797. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-68927016')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14798. */
  14799. HTMLTableRowElement15: function(test) {
  14800. var success;
  14801. var nodeList;
  14802. var testNode;
  14803. var newCell;
  14804. var doc;
  14805. var docRef = null;
  14806. if (typeof(this.doc) != 'undefined') {
  14807. docRef = this.doc;
  14808. }
  14809. doc = load("tablerow");
  14810. nodeList = doc.getElementsByTagName("tr");
  14811. test.equal(nodeList.length, 5, 'Asize');
  14812. testNode = nodeList.item(3);
  14813. {
  14814. success = false;
  14815. try {
  14816. newCell = testNode.insertCell(7);
  14817. }
  14818. catch(ex) {
  14819. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14820. }
  14821. test.ok(success, 'HTMLTableRowElement15');
  14822. }
  14823. test.done();
  14824. },
  14825. /**
  14826. *
  14827. The insertCell() method throws a INDEX_SIZE_ERR DOMException
  14828. if the specified index is negative.
  14829. Retrieve the fourth TR element which has six cells. Try
  14830. to insert a cell using an index of negative seven. This should throw
  14831. a INDEX_SIZE_ERR DOMException since the index is negative.
  14832. * @author NIST
  14833. * @author Rick Rivello
  14834. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016
  14835. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-68927016')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14836. */
  14837. HTMLTableRowElement16: function(test) {
  14838. var success;
  14839. var nodeList;
  14840. var testNode;
  14841. var newCell;
  14842. var doc;
  14843. var docRef = null;
  14844. if (typeof(this.doc) != 'undefined') {
  14845. docRef = this.doc;
  14846. }
  14847. doc = load("tablerow");
  14848. nodeList = doc.getElementsByTagName("tr");
  14849. test.equal(nodeList.length, 5, 'Asize');
  14850. testNode = nodeList.item(3);
  14851. {
  14852. success = false;
  14853. try {
  14854. newCell = testNode.insertCell(-7);
  14855. }
  14856. catch(ex) {
  14857. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14858. }
  14859. test.ok(success, 'HTMLTableRowElement16');
  14860. }
  14861. test.done();
  14862. },
  14863. /**
  14864. *
  14865. The deleteCell() method throws a INDEX_SIZE_ERR DOMException
  14866. if the specified index is greater than the number of cells.
  14867. Retrieve the fourth TR element which has six cells. Try
  14868. to delete a cell using an index of seven. This should throw
  14869. a INDEX_SIZE_ERR DOMException since there are only six cells.
  14870. * @author NIST
  14871. * @author Rick Rivello
  14872. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598
  14873. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-11738598')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14874. */
  14875. HTMLTableRowElement17: function(test) {
  14876. var success;
  14877. var nodeList;
  14878. var testNode;
  14879. var doc;
  14880. var docRef = null;
  14881. if (typeof(this.doc) != 'undefined') {
  14882. docRef = this.doc;
  14883. }
  14884. doc = load("tablerow");
  14885. nodeList = doc.getElementsByTagName("tr");
  14886. test.equal(nodeList.length, 5, 'Asize');
  14887. testNode = nodeList.item(3);
  14888. {
  14889. success = false;
  14890. try {
  14891. testNode.deleteCell(7);
  14892. }
  14893. catch(ex) {
  14894. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14895. }
  14896. test.ok(success, 'HTMLTableRowElement17');
  14897. }
  14898. test.done();
  14899. },
  14900. /**
  14901. *
  14902. The deleteCell() method throws a INDEX_SIZE_ERR DOMException
  14903. if the specified index is equal to the number of cells.
  14904. Retrieve the fourth TR element which has six cells. Try
  14905. to delete a cell using an index of six. This should throw
  14906. a INDEX_SIZE_ERR DOMException since there are only six cells.
  14907. * @author NIST
  14908. * @author Rick Rivello
  14909. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598
  14910. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-11738598')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14911. */
  14912. HTMLTableRowElement18: function(test) {
  14913. var success;
  14914. var nodeList;
  14915. var testNode;
  14916. var doc;
  14917. var docRef = null;
  14918. if (typeof(this.doc) != 'undefined') {
  14919. docRef = this.doc;
  14920. }
  14921. doc = load("tablerow");
  14922. nodeList = doc.getElementsByTagName("tr");
  14923. test.equal(nodeList.length, 5, 'Asize');
  14924. testNode = nodeList.item(3);
  14925. {
  14926. success = false;
  14927. try {
  14928. testNode.deleteCell(6);
  14929. }
  14930. catch(ex) {
  14931. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14932. }
  14933. test.ok(success, 'HTMLTableRowElement18');
  14934. }
  14935. test.done();
  14936. },
  14937. /**
  14938. *
  14939. The deleteCell() method throws a INDEX_SIZE_ERR DOMException
  14940. if the specified index is negative.
  14941. Retrieve the fourth TR element which has six cells. Try
  14942. to delete a cell using an index of negative six. This should throw
  14943. a INDEX_SIZE_ERR DOMException since the index is negative.
  14944. * @author NIST
  14945. * @author Rick Rivello
  14946. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598
  14947. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-11738598')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  14948. */
  14949. HTMLTableRowElement19: function(test) {
  14950. var success;
  14951. var nodeList;
  14952. var testNode;
  14953. var doc;
  14954. var docRef = null;
  14955. if (typeof(this.doc) != 'undefined') {
  14956. docRef = this.doc;
  14957. }
  14958. doc = load("tablerow");
  14959. nodeList = doc.getElementsByTagName("tr");
  14960. test.equal(nodeList.length, 5, 'Asize');
  14961. testNode = nodeList.item(3);
  14962. {
  14963. success = false;
  14964. try {
  14965. testNode.deleteCell(-6);
  14966. }
  14967. catch(ex) {
  14968. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  14969. }
  14970. test.ok(success, 'HTMLTableRowElement19');
  14971. }
  14972. test.done();
  14973. },
  14974. /**
  14975. *
  14976. The insertCell() method inserts an empty TD cell into this row.
  14977. If index is -1 or equal to the number of cells, the new cell is
  14978. appended.
  14979. Retrieve the fourth TR element and examine the value of
  14980. the cells length attribute which should be set to six.
  14981. Check the value of the last TD element. Invoke the
  14982. insertCell() with an index of negative one
  14983. which will append the empty cell to the end of the list.
  14984. Check the value of the newly created cell and make sure it is null
  14985. and also the numbers of cells should now be seven.
  14986. * @author NIST
  14987. * @author Rick Rivello
  14988. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016
  14989. */
  14990. HTMLTableRowElement20: function(test) {
  14991. var success;
  14992. var nodeList;
  14993. var cellsnodeList;
  14994. var testNode;
  14995. var trNode;
  14996. var cellNode;
  14997. var value;
  14998. var newCell;
  14999. var vcells;
  15000. var doc;
  15001. var docRef = null;
  15002. if (typeof(this.doc) != 'undefined') {
  15003. docRef = this.doc;
  15004. }
  15005. doc = load("tablerow");
  15006. nodeList = doc.getElementsByTagName("tr");
  15007. test.equal(nodeList.length, 5, 'Asize');
  15008. testNode = nodeList.item(3);
  15009. cellsnodeList = testNode.cells;
  15010. vcells = cellsnodeList.length;
  15011. test.equal(vcells, 6, "cellsLink1");
  15012. trNode = cellsnodeList.item(5);
  15013. cellNode = trNode.firstChild;
  15014. value = cellNode.nodeValue;
  15015. test.equal(value, "1230 North Ave. Dallas, Texas 98551", "value1Link");
  15016. newCell = testNode.insertCell(-1);
  15017. testNode = nodeList.item(3);
  15018. cellsnodeList = testNode.cells;
  15019. vcells = cellsnodeList.length;
  15020. test.equal(vcells, 7, "cellsLink2");
  15021. trNode = cellsnodeList.item(6);
  15022. cellNode = trNode.firstChild;
  15023. test.equal(cellNode, null, 'cellNode should be null');
  15024. test.done();
  15025. },
  15026. /**
  15027. *
  15028. The deleteCell() method deletes a cell from the currtent row. If
  15029. the index is -1 the last cell in the row is deleted.
  15030. Retrieve the fourth TR element and examine the value of
  15031. the cells length attribute which should be set to six.
  15032. Check the value of the last TD element. Invoke the
  15033. deleteCell() with an index of negative one
  15034. which will delete the last cell in the row.
  15035. Check the value of the of the last cell
  15036. and also the numbers of cells should now be five.
  15037. * @author NIST
  15038. * @author Rick Rivello
  15039. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598
  15040. */
  15041. HTMLTableRowElement21: function(test) {
  15042. var success;
  15043. var nodeList;
  15044. var cellsnodeList;
  15045. var testNode;
  15046. var trNode;
  15047. var cellNode;
  15048. var value;
  15049. var vcells;
  15050. var doc;
  15051. var docRef = null;
  15052. if (typeof(this.doc) != 'undefined') {
  15053. docRef = this.doc;
  15054. }
  15055. doc = load("tablerow");
  15056. nodeList = doc.getElementsByTagName("tr");
  15057. test.equal(nodeList.length, 5, 'Asize');
  15058. testNode = nodeList.item(3);
  15059. cellsnodeList = testNode.cells;
  15060. vcells = cellsnodeList.length;
  15061. test.equal(vcells, 6, "cellsLink1");
  15062. trNode = cellsnodeList.item(5);
  15063. cellNode = trNode.firstChild;
  15064. value = cellNode.nodeValue;
  15065. test.equal(value, "1230 North Ave. Dallas, Texas 98551", "value1Link");
  15066. testNode.deleteCell(-1);
  15067. testNode = nodeList.item(3);
  15068. cellsnodeList = testNode.cells;
  15069. vcells = cellsnodeList.length;
  15070. test.equal(vcells, 5, "cellsLink2");
  15071. trNode = cellsnodeList.item(4);
  15072. cellNode = trNode.firstChild;
  15073. value = cellNode.nodeValue;
  15074. test.equal(value, "Female", "value2Link");
  15075. test.done();
  15076. },
  15077. /**
  15078. *
  15079. The align attribute specifies the horizontal alignment of data within
  15080. cells.
  15081. Retrieve the align attribute of the first THEAD element and examine
  15082. its value.
  15083. * @author NIST
  15084. * @author Mary Brady
  15085. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119
  15086. */
  15087. HTMLTableSectionElement01: function(test) {
  15088. var success;
  15089. var nodeList;
  15090. var testNode;
  15091. var valign;
  15092. var doc;
  15093. var docRef = null;
  15094. if (typeof(this.doc) != 'undefined') {
  15095. docRef = this.doc;
  15096. }
  15097. doc = load("tablesection");
  15098. nodeList = doc.getElementsByTagName("thead");
  15099. test.equal(nodeList.length, 1, 'Asize');
  15100. testNode = nodeList.item(0);
  15101. valign = testNode.align;
  15102. test.equal(valign, "center", "alignLink");
  15103. test.done();
  15104. },
  15105. /**
  15106. *
  15107. The align attribute specifies the horizontal alignment of data within
  15108. cells.
  15109. Retrieve the align attribute of the first TFOOT element and examine
  15110. its value.
  15111. * @author NIST
  15112. * @author Mary Brady
  15113. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119
  15114. */
  15115. HTMLTableSectionElement02: function(test) {
  15116. var success;
  15117. var nodeList;
  15118. var testNode;
  15119. var valign;
  15120. var doc;
  15121. var docRef = null;
  15122. if (typeof(this.doc) != 'undefined') {
  15123. docRef = this.doc;
  15124. }
  15125. doc = load("tablesection");
  15126. nodeList = doc.getElementsByTagName("tfoot");
  15127. test.equal(nodeList.length, 1, 'Asize');
  15128. testNode = nodeList.item(0);
  15129. valign = testNode.align;
  15130. test.equal(valign, "center", "alignLink");
  15131. test.done();
  15132. },
  15133. /**
  15134. *
  15135. The align attribute specifies the horizontal alignment of data within
  15136. cells.
  15137. Retrieve the align attribute of the first TBODY element and examine
  15138. its value.
  15139. * @author NIST
  15140. * @author Mary Brady
  15141. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119
  15142. */
  15143. HTMLTableSectionElement03: function(test) {
  15144. var success;
  15145. var nodeList;
  15146. var testNode;
  15147. var valign;
  15148. var doc;
  15149. var docRef = null;
  15150. if (typeof(this.doc) != 'undefined') {
  15151. docRef = this.doc;
  15152. }
  15153. doc = load("tablesection");
  15154. nodeList = doc.getElementsByTagName("tbody");
  15155. test.equal(nodeList.length, 2, 'Asize');
  15156. testNode = nodeList.item(1);
  15157. valign = testNode.align;
  15158. test.equal(valign, "center", "alignLink");
  15159. test.done();
  15160. },
  15161. /**
  15162. *
  15163. The ch attribute specifies the alignment character for cells in a
  15164. column.
  15165. Retrieve the char attribute of the first THEAD element and examine
  15166. its value.
  15167. * @author NIST
  15168. * @author Mary Brady
  15169. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012
  15170. */
  15171. HTMLTableSectionElement04: function(test) {
  15172. var success;
  15173. var nodeList;
  15174. var testNode;
  15175. var vch;
  15176. var doc;
  15177. var docRef = null;
  15178. if (typeof(this.doc) != 'undefined') {
  15179. docRef = this.doc;
  15180. }
  15181. doc = load("tablesection");
  15182. nodeList = doc.getElementsByTagName("thead");
  15183. test.equal(nodeList.length, 1, 'Asize');
  15184. testNode = nodeList.item(0);
  15185. vch = testNode.ch;
  15186. test.equal(vch, "*", "chLink");
  15187. test.done();
  15188. },
  15189. /**
  15190. *
  15191. The ch attribute specifies the alignment character for cells in a
  15192. column.
  15193. Retrieve the char attribute of the first TFOOT element and examine
  15194. its value.
  15195. * @author NIST
  15196. * @author Mary Brady
  15197. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012
  15198. */
  15199. HTMLTableSectionElement05: function(test) {
  15200. var success;
  15201. var nodeList;
  15202. var testNode;
  15203. var vch;
  15204. var doc;
  15205. var docRef = null;
  15206. if (typeof(this.doc) != 'undefined') {
  15207. docRef = this.doc;
  15208. }
  15209. doc = load("tablesection");
  15210. nodeList = doc.getElementsByTagName("tfoot");
  15211. test.equal(nodeList.length, 1, 'Asize');
  15212. testNode = nodeList.item(0);
  15213. vch = testNode.ch;
  15214. test.equal(vch, "+", "chLink");
  15215. test.done();
  15216. },
  15217. /**
  15218. *
  15219. The ch attribute specifies the alignment character for cells in a
  15220. column.
  15221. Retrieve the char attribute of the first TBODY element and examine
  15222. its value.
  15223. * @author NIST
  15224. * @author Mary Brady
  15225. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012
  15226. */
  15227. HTMLTableSectionElement06: function(test) {
  15228. var success;
  15229. var nodeList;
  15230. var testNode;
  15231. var vch;
  15232. var doc;
  15233. var docRef = null;
  15234. if (typeof(this.doc) != 'undefined') {
  15235. docRef = this.doc;
  15236. }
  15237. doc = load("tablesection");
  15238. nodeList = doc.getElementsByTagName("tbody");
  15239. test.equal(nodeList.length, 2, 'Asize');
  15240. testNode = nodeList.item(1);
  15241. vch = testNode.ch;
  15242. test.equal(vch, "$", "chLink");
  15243. test.done();
  15244. },
  15245. /**
  15246. *
  15247. The chOff attribute specifies the offset of alignment character.
  15248. Retrieve the charoff attribute of the first THEAD element and examine
  15249. its value.
  15250. * @author NIST
  15251. * @author Mary Brady
  15252. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732
  15253. */
  15254. HTMLTableSectionElement07: function(test) {
  15255. var success;
  15256. var nodeList;
  15257. var testNode;
  15258. var vcharoff;
  15259. var doc;
  15260. var docRef = null;
  15261. if (typeof(this.doc) != 'undefined') {
  15262. docRef = this.doc;
  15263. }
  15264. doc = load("tablesection");
  15265. nodeList = doc.getElementsByTagName("thead");
  15266. test.equal(nodeList.length, 1, 'Asize');
  15267. testNode = nodeList.item(0);
  15268. vcharoff = testNode.chOff;
  15269. test.equal(vcharoff, "1", "chOffLink");
  15270. test.done();
  15271. },
  15272. /**
  15273. *
  15274. The chOff attribute specifies the offset of alignment character.
  15275. Retrieve the charoff attribute of the first TFOOT element and examine
  15276. its value.
  15277. * @author NIST
  15278. * @author Mary Brady
  15279. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732
  15280. */
  15281. HTMLTableSectionElement08: function(test) {
  15282. var success;
  15283. var nodeList;
  15284. var testNode;
  15285. var vcharoff;
  15286. var doc;
  15287. var docRef = null;
  15288. if (typeof(this.doc) != 'undefined') {
  15289. docRef = this.doc;
  15290. }
  15291. doc = load("tablesection");
  15292. nodeList = doc.getElementsByTagName("tfoot");
  15293. test.equal(nodeList.length, 1, 'Asize');
  15294. testNode = nodeList.item(0);
  15295. vcharoff = testNode.chOff;
  15296. test.equal(vcharoff, "2", "chOffLink");
  15297. test.done();
  15298. },
  15299. /**
  15300. *
  15301. The chOff attribute specifies the offset of alignment character.
  15302. Retrieve the charoff attribute of the first TBODY element and examine
  15303. its value.
  15304. * @author NIST
  15305. * @author Mary Brady
  15306. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732
  15307. */
  15308. HTMLTableSectionElement09: function(test) {
  15309. var success;
  15310. var nodeList;
  15311. var testNode;
  15312. var vcharoff;
  15313. var doc;
  15314. var docRef = null;
  15315. if (typeof(this.doc) != 'undefined') {
  15316. docRef = this.doc;
  15317. }
  15318. doc = load("tablesection");
  15319. nodeList = doc.getElementsByTagName("tbody");
  15320. test.equal(nodeList.length, 2, 'Asize');
  15321. testNode = nodeList.item(1);
  15322. vcharoff = testNode.chOff;
  15323. test.equal(vcharoff, "3", "chOffLink");
  15324. test.done();
  15325. },
  15326. /**
  15327. *
  15328. The vAlign attribute specifies the vertical alignment of cell data in
  15329. column.
  15330. Retrieve the vAlign attribute of the first THEAD element and examine
  15331. its value.
  15332. * @author NIST
  15333. * @author Mary Brady
  15334. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116
  15335. */
  15336. HTMLTableSectionElement10: function(test) {
  15337. var success;
  15338. var nodeList;
  15339. var testNode;
  15340. var vvalign;
  15341. var doc;
  15342. var docRef = null;
  15343. if (typeof(this.doc) != 'undefined') {
  15344. docRef = this.doc;
  15345. }
  15346. doc = load("tablesection");
  15347. nodeList = doc.getElementsByTagName("thead");
  15348. test.equal(nodeList.length, 1, 'Asize');
  15349. testNode = nodeList.item(0);
  15350. vvalign = testNode.vAlign;
  15351. test.equal(vvalign, "middle", "vAlignLink");
  15352. test.done();
  15353. },
  15354. /**
  15355. *
  15356. The vAlign attribute specifies the vertical alignment of cell data in
  15357. column.
  15358. Retrieve the vAlign attribute of the first TFOOT element and examine
  15359. its value.
  15360. * @author NIST
  15361. * @author Mary Brady
  15362. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116
  15363. */
  15364. HTMLTableSectionElement11: function(test) {
  15365. var success;
  15366. var nodeList;
  15367. var testNode;
  15368. var vvalign;
  15369. var doc;
  15370. var docRef = null;
  15371. if (typeof(this.doc) != 'undefined') {
  15372. docRef = this.doc;
  15373. }
  15374. doc = load("tablesection");
  15375. nodeList = doc.getElementsByTagName("tfoot");
  15376. test.equal(nodeList.length, 1, 'Asize');
  15377. testNode = nodeList.item(0);
  15378. vvalign = testNode.vAlign;
  15379. test.equal(vvalign, "middle", "vAlignLink");
  15380. test.done();
  15381. },
  15382. /**
  15383. *
  15384. The vAlign attribute specifies the vertical alignment of cell data in
  15385. column.
  15386. Retrieve the vAlign attribute of the first TBODY element and examine
  15387. its value.
  15388. * @author NIST
  15389. * @author Mary Brady
  15390. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116
  15391. */
  15392. HTMLTableSectionElement12: function(test) {
  15393. var success;
  15394. var nodeList;
  15395. var testNode;
  15396. var vvalign;
  15397. var doc;
  15398. var docRef = null;
  15399. if (typeof(this.doc) != 'undefined') {
  15400. docRef = this.doc;
  15401. }
  15402. doc = load("tablesection");
  15403. nodeList = doc.getElementsByTagName("tbody");
  15404. test.equal(nodeList.length, 2, 'Asize');
  15405. testNode = nodeList.item(1);
  15406. vvalign = testNode.vAlign;
  15407. test.equal(vvalign, "middle", "vAlignLink");
  15408. test.done();
  15409. },
  15410. /**
  15411. *
  15412. The rows attribute specifies the collection of rows in this table section.
  15413. Retrieve the first THEAD element and examine the value of
  15414. the rows length attribute.
  15415. * @author NIST
  15416. * @author Mary Brady
  15417. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650
  15418. */
  15419. HTMLTableSectionElement13: function(test) {
  15420. var success;
  15421. var nodeList;
  15422. var rowsnodeList;
  15423. var testNode;
  15424. var vrows;
  15425. var doc;
  15426. var docRef = null;
  15427. if (typeof(this.doc) != 'undefined') {
  15428. docRef = this.doc;
  15429. }
  15430. doc = load("tablesection");
  15431. nodeList = doc.getElementsByTagName("thead");
  15432. test.equal(nodeList.length, 1, 'Asize');
  15433. testNode = nodeList.item(0);
  15434. rowsnodeList = testNode.rows;
  15435. vrows = rowsnodeList.length;
  15436. test.equal(vrows, 1, "rowsLink");
  15437. test.done();
  15438. },
  15439. /**
  15440. *
  15441. The rows attribute specifies the collection of rows in this table section.
  15442. Retrieve the first TFOOT element and examine the value of
  15443. the rows length attribute.
  15444. * @author NIST
  15445. * @author Mary Brady
  15446. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650
  15447. */
  15448. HTMLTableSectionElement14: function(test) {
  15449. var success;
  15450. var nodeList;
  15451. var rowsnodeList;
  15452. var testNode;
  15453. var vrows;
  15454. var doc;
  15455. var docRef = null;
  15456. if (typeof(this.doc) != 'undefined') {
  15457. docRef = this.doc;
  15458. }
  15459. doc = load("tablesection");
  15460. nodeList = doc.getElementsByTagName("tfoot");
  15461. test.equal(nodeList.length, 1, 'Asize');
  15462. testNode = nodeList.item(0);
  15463. rowsnodeList = testNode.rows;
  15464. vrows = rowsnodeList.length;
  15465. test.equal(vrows, 1, "rowsLink");
  15466. test.done();
  15467. },
  15468. /**
  15469. *
  15470. The rows attribute specifies the collection of rows in this table section.
  15471. Retrieve the first TBODY element and examine the value of
  15472. the rows length attribute.
  15473. * @author NIST
  15474. * @author Mary Brady
  15475. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650
  15476. */
  15477. HTMLTableSectionElement15: function(test) {
  15478. var success;
  15479. var nodeList;
  15480. var rowsnodeList;
  15481. var testNode;
  15482. var vrows;
  15483. var doc;
  15484. var docRef = null;
  15485. if (typeof(this.doc) != 'undefined') {
  15486. docRef = this.doc;
  15487. }
  15488. doc = load("tablesection");
  15489. nodeList = doc.getElementsByTagName("tbody");
  15490. test.equal(nodeList.length, 2, 'Asize');
  15491. testNode = nodeList.item(1);
  15492. rowsnodeList = testNode.rows;
  15493. vrows = rowsnodeList.length;
  15494. test.equal(vrows, 2, "rowsLink");
  15495. test.done();
  15496. },
  15497. /**
  15498. *
  15499. The insertRow() method inserts a new empty table row.
  15500. Retrieve the first THEAD element and invoke the insertRow() method
  15501. with an index of 0. The nuber of rows in the THEAD section before
  15502. insertion of the new row is one. After the new row is inserted the number
  15503. of rows in the THEAD section is two.
  15504. * @author NIST
  15505. * @author Rick Rivello
  15506. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
  15507. */
  15508. HTMLTableSectionElement16: function(test) {
  15509. var success;
  15510. var nodeList;
  15511. var testNode;
  15512. var newRow;
  15513. var rowsnodeList;
  15514. var vrows;
  15515. var doc;
  15516. var docRef = null;
  15517. if (typeof(this.doc) != 'undefined') {
  15518. docRef = this.doc;
  15519. }
  15520. doc = load("tablesection");
  15521. nodeList = doc.getElementsByTagName("thead");
  15522. test.equal(nodeList.length, 1, 'Asize');
  15523. testNode = nodeList.item(0);
  15524. rowsnodeList = testNode.rows;
  15525. vrows = rowsnodeList.length;
  15526. test.equal(vrows, 1, "rowsLink1");
  15527. newRow = testNode.insertRow(0);
  15528. rowsnodeList = testNode.rows;
  15529. vrows = rowsnodeList.length;
  15530. test.equal(vrows, 2, "rowsLink2");
  15531. test.done();
  15532. },
  15533. /**
  15534. *
  15535. The insertRow() method inserts a new empty table row.
  15536. Retrieve the first TFOOT element and invoke the insertRow() method
  15537. with an index of 0. The nuber of rows in the TFOOT section before
  15538. insertion of the new row is one. After the new row is inserted the number
  15539. of rows in the TFOOT section is two.
  15540. * @author NIST
  15541. * @author Rick Rivello
  15542. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
  15543. */
  15544. HTMLTableSectionElement17: function(test) {
  15545. var success;
  15546. var nodeList;
  15547. var testNode;
  15548. var newRow;
  15549. var rowsnodeList;
  15550. var vrows;
  15551. var doc;
  15552. var docRef = null;
  15553. if (typeof(this.doc) != 'undefined') {
  15554. docRef = this.doc;
  15555. }
  15556. doc = load("tablesection");
  15557. nodeList = doc.getElementsByTagName("tfoot");
  15558. test.equal(nodeList.length, 1, 'Asize');
  15559. testNode = nodeList.item(0);
  15560. rowsnodeList = testNode.rows;
  15561. vrows = rowsnodeList.length;
  15562. test.equal(vrows, 1, "rowsLink1");
  15563. newRow = testNode.insertRow(0);
  15564. rowsnodeList = testNode.rows;
  15565. vrows = rowsnodeList.length;
  15566. test.equal(vrows, 2, "rowsLink2");
  15567. test.done();
  15568. },
  15569. /**
  15570. *
  15571. The insertRow() method inserts a new empty table row.
  15572. Retrieve the first TBODY element and invoke the insertRow() method
  15573. with an index of 0. The nuber of rows in the TBODY section before
  15574. insertion of the new row is two. After the new row is inserted the number
  15575. of rows in the TBODY section is three.
  15576. * @author NIST
  15577. * @author Rick Rivello
  15578. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
  15579. */
  15580. HTMLTableSectionElement18: function(test) {
  15581. var success;
  15582. var nodeList;
  15583. var testNode;
  15584. var newRow;
  15585. var rowsnodeList;
  15586. var vrows;
  15587. var doc;
  15588. var docRef = null;
  15589. if (typeof(this.doc) != 'undefined') {
  15590. docRef = this.doc;
  15591. }
  15592. doc = load("tablesection");
  15593. nodeList = doc.getElementsByTagName("tbody");
  15594. test.equal(nodeList.length, 2, 'Asize');
  15595. testNode = nodeList.item(1);
  15596. rowsnodeList = testNode.rows;
  15597. vrows = rowsnodeList.length;
  15598. test.equal(vrows, 2, "rowsLink1");
  15599. newRow = testNode.insertRow(0);
  15600. rowsnodeList = testNode.rows;
  15601. vrows = rowsnodeList.length;
  15602. test.equal(vrows, 3, "rowsLink2");
  15603. test.done();
  15604. },
  15605. /**
  15606. *
  15607. The insertRow() method inserts a new empty table row.
  15608. Retrieve the first THEAD element and invoke the insertRow() method
  15609. with an index of 1. The nuber of rows in the THEAD section before
  15610. insertion of the new row is one therefore the new row is appended.
  15611. After the new row is inserted the number of rows in the THEAD
  15612. section is two.
  15613. * @author NIST
  15614. * @author Rick Rivello
  15615. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
  15616. */
  15617. HTMLTableSectionElement19: function(test) {
  15618. var success;
  15619. var nodeList;
  15620. var testNode;
  15621. var newRow;
  15622. var rowsnodeList;
  15623. var vrows;
  15624. var doc;
  15625. var docRef = null;
  15626. if (typeof(this.doc) != 'undefined') {
  15627. docRef = this.doc;
  15628. }
  15629. doc = load("tablesection");
  15630. nodeList = doc.getElementsByTagName("thead");
  15631. test.equal(nodeList.length, 1, 'Asize');
  15632. testNode = nodeList.item(0);
  15633. rowsnodeList = testNode.rows;
  15634. vrows = rowsnodeList.length;
  15635. test.equal(vrows, 1, "rowsLink1");
  15636. newRow = testNode.insertRow(1);
  15637. rowsnodeList = testNode.rows;
  15638. vrows = rowsnodeList.length;
  15639. test.equal(vrows, 2, "rowsLink2");
  15640. test.done();
  15641. },
  15642. /**
  15643. *
  15644. The insertRow() method inserts a new empty table row.
  15645. Retrieve the first TFOOT element and invoke the insertRow() method
  15646. with an index of one. The nuber of rows in the TFOOT section before
  15647. insertion of the new row is one therefore the new row is appended.
  15648. After the new row is inserted the number of rows in the TFOOT section
  15649. is two.
  15650. * @author NIST
  15651. * @author Rick Rivello
  15652. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
  15653. */
  15654. HTMLTableSectionElement20: function(test) {
  15655. var success;
  15656. var nodeList;
  15657. var testNode;
  15658. var newRow;
  15659. var rowsnodeList;
  15660. var vrows;
  15661. var doc;
  15662. var docRef = null;
  15663. if (typeof(this.doc) != 'undefined') {
  15664. docRef = this.doc;
  15665. }
  15666. doc = load("tablesection");
  15667. nodeList = doc.getElementsByTagName("tfoot");
  15668. test.equal(nodeList.length, 1, 'Asize');
  15669. testNode = nodeList.item(0);
  15670. rowsnodeList = testNode.rows;
  15671. vrows = rowsnodeList.length;
  15672. test.equal(vrows, 1, "rowsLink1");
  15673. newRow = testNode.insertRow(1);
  15674. rowsnodeList = testNode.rows;
  15675. vrows = rowsnodeList.length;
  15676. test.equal(vrows, 2, "rowsLink2");
  15677. test.done();
  15678. },
  15679. /**
  15680. *
  15681. The insertRow() method inserts a new empty table row.
  15682. Retrieve the first TBODY element and invoke the insertRow() method
  15683. with an index of two. The number of rows in the TBODY section before
  15684. insertion of the new row is two therefore the row is appended.
  15685. After the new row is inserted the number of rows in the TBODY section is
  15686. three.
  15687. * @author NIST
  15688. * @author Rick Rivello
  15689. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
  15690. * @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=502
  15691. */
  15692. HTMLTableSectionElement21: function(test) {
  15693. var success;
  15694. var nodeList;
  15695. var testNode;
  15696. var newRow;
  15697. var rowsnodeList;
  15698. var vrows;
  15699. var doc;
  15700. var docRef = null;
  15701. if (typeof(this.doc) != 'undefined') {
  15702. docRef = this.doc;
  15703. }
  15704. doc = load("tablesection");
  15705. nodeList = doc.getElementsByTagName("tbody");
  15706. test.equal(nodeList.length, 2, 'Asize');
  15707. testNode = nodeList.item(1);
  15708. rowsnodeList = testNode.rows;
  15709. vrows = rowsnodeList.length;
  15710. test.equal(vrows, 2, "rowsLink1");
  15711. newRow = testNode.insertRow(2);
  15712. rowsnodeList = testNode.rows;
  15713. vrows = rowsnodeList.length;
  15714. test.equal(vrows, 3, "rowsLink2");
  15715. test.done();
  15716. },
  15717. /**
  15718. *
  15719. The deleteRow() method deletes a row from this section.
  15720. Retrieve the first THEAD element and invoke the deleteRow() method
  15721. with an index of 0. The nuber of rows in the THEAD section before
  15722. the deletion of the row is one. After the row is deleted the number
  15723. of rows in the THEAD section is zero.
  15724. * @author NIST
  15725. * @author Rick Rivello
  15726. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626
  15727. */
  15728. HTMLTableSectionElement22: function(test) {
  15729. var success;
  15730. var nodeList;
  15731. var testNode;
  15732. var rowsnodeList;
  15733. var vrows;
  15734. var doc;
  15735. var docRef = null;
  15736. if (typeof(this.doc) != 'undefined') {
  15737. docRef = this.doc;
  15738. }
  15739. doc = load("tablesection");
  15740. nodeList = doc.getElementsByTagName("thead");
  15741. test.equal(nodeList.length, 1, 'Asize');
  15742. testNode = nodeList.item(0);
  15743. rowsnodeList = testNode.rows;
  15744. vrows = rowsnodeList.length;
  15745. test.equal(vrows, 1, "rowsLink1");
  15746. testNode.deleteRow(0);
  15747. rowsnodeList = testNode.rows;
  15748. vrows = rowsnodeList.length;
  15749. test.equal(vrows, 0, "rowsLink2");
  15750. test.done();
  15751. },
  15752. /**
  15753. *
  15754. The deleteRow() method deletes a row from this section.
  15755. Retrieve the first TFOOT element and invoke the deleteRow() method
  15756. with an index of 0. The nuber of rows in the TFOOT section before
  15757. the deletion of the row is one. After the row is deleted the number
  15758. of rows in the TFOOT section is zero.
  15759. * @author NIST
  15760. * @author Rick Rivello
  15761. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626
  15762. */
  15763. HTMLTableSectionElement23: function(test) {
  15764. var success;
  15765. var nodeList;
  15766. var testNode;
  15767. var rowsnodeList;
  15768. var vrows;
  15769. var doc;
  15770. var docRef = null;
  15771. if (typeof(this.doc) != 'undefined') {
  15772. docRef = this.doc;
  15773. }
  15774. doc = load("tablesection");
  15775. nodeList = doc.getElementsByTagName("tfoot");
  15776. test.equal(nodeList.length, 1, 'Asize');
  15777. testNode = nodeList.item(0);
  15778. rowsnodeList = testNode.rows;
  15779. vrows = rowsnodeList.length;
  15780. test.equal(vrows, 1, "rowsLink1");
  15781. testNode.deleteRow(0);
  15782. rowsnodeList = testNode.rows;
  15783. vrows = rowsnodeList.length;
  15784. test.equal(vrows, 0, "rowsLink2");
  15785. test.done();
  15786. },
  15787. /**
  15788. *
  15789. The deleteRow() method deletes a row from this section.
  15790. Retrieve the first TBODY element and invoke the deleteRow() method
  15791. with an index of 0. The nuber of rows in the TBODY section before
  15792. the deletion of the row is two. After the row is deleted the number
  15793. of rows in the TBODY section is one.
  15794. * @author NIST
  15795. * @author Rick Rivello
  15796. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626
  15797. */
  15798. HTMLTableSectionElement24: function(test) {
  15799. var success;
  15800. var nodeList;
  15801. var testNode;
  15802. var rowsnodeList;
  15803. var vrows;
  15804. var doc;
  15805. var docRef = null;
  15806. if (typeof(this.doc) != 'undefined') {
  15807. docRef = this.doc;
  15808. }
  15809. doc = load("tablesection");
  15810. nodeList = doc.getElementsByTagName("tbody");
  15811. test.equal(nodeList.length, 2, 'Asize');
  15812. testNode = nodeList.item(1);
  15813. rowsnodeList = testNode.rows;
  15814. vrows = rowsnodeList.length;
  15815. test.equal(vrows, 2, "rowsLink1");
  15816. testNode.deleteRow(0);
  15817. rowsnodeList = testNode.rows;
  15818. vrows = rowsnodeList.length;
  15819. test.equal(vrows, 1, "rowsLink2");
  15820. test.done();
  15821. },
  15822. /**
  15823. *
  15824. The insertRow() method throws a INDEX_SIZE_ERR DOMException
  15825. if the specified index is greater than the number of rows.
  15826. Retrieve the first THEAD element which has one row. Try
  15827. to insert a new row using an index of two. This should throw
  15828. a INDEX_SIZE_ERR DOMException since there is only one row.
  15829. * @author NIST
  15830. * @author Rick Rivello
  15831. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626
  15832. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-93995626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  15833. */
  15834. HTMLTableSectionElement25: function(test) {
  15835. var success;
  15836. var nodeList;
  15837. var testNode;
  15838. var newRow;
  15839. var doc;
  15840. var docRef = null;
  15841. if (typeof(this.doc) != 'undefined') {
  15842. docRef = this.doc;
  15843. }
  15844. doc = load("tablesection");
  15845. nodeList = doc.getElementsByTagName("thead");
  15846. test.equal(nodeList.length, 1, 'Asize');
  15847. testNode = nodeList.item(0);
  15848. {
  15849. success = false;
  15850. try {
  15851. newRow = testNode.insertRow(2);
  15852. }
  15853. catch(ex) {
  15854. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  15855. }
  15856. test.ok(success, 'HTMLTableSectionElement25');
  15857. }
  15858. test.done();
  15859. },
  15860. /**
  15861. *
  15862. The insertRow() method throws a INDEX_SIZE_ERR DOMException
  15863. if the specified index is negative.
  15864. Retrieve the first THEAD element which has one row. Try
  15865. to insert a new row using an index of negative two. This should throw
  15866. a INDEX_SIZE_ERR DOMException since the index is negative.
  15867. * @author NIST
  15868. * @author Rick Rivello
  15869. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626
  15870. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-93995626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  15871. */
  15872. HTMLTableSectionElement26: function(test) {
  15873. var success;
  15874. var nodeList;
  15875. var testNode;
  15876. var newRow;
  15877. var doc;
  15878. var docRef = null;
  15879. if (typeof(this.doc) != 'undefined') {
  15880. docRef = this.doc;
  15881. }
  15882. doc = load("tablesection");
  15883. nodeList = doc.getElementsByTagName("thead");
  15884. test.equal(nodeList.length, 1, 'Asize');
  15885. testNode = nodeList.item(0);
  15886. {
  15887. success = false;
  15888. try {
  15889. newRow = testNode.insertRow(-2);
  15890. }
  15891. catch(ex) {
  15892. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  15893. }
  15894. test.ok(success, 'HTMLTableSectionElement26');
  15895. }
  15896. test.done();
  15897. },
  15898. /**
  15899. *
  15900. The deleteRow() method throws a INDEX_SIZE_ERR DOMException
  15901. if the specified index is greater than the number of rows.
  15902. Retrieve the first THEAD element which has one row. Try
  15903. to delete a row using an index of two. This should throw
  15904. a INDEX_SIZE_ERR DOMException since the index is greater than the
  15905. number of rows.
  15906. * @author NIST
  15907. * @author Rick Rivello
  15908. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626
  15909. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-5625626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  15910. */
  15911. HTMLTableSectionElement27: function(test) {
  15912. var success;
  15913. var nodeList;
  15914. var testNode;
  15915. var doc;
  15916. var docRef = null;
  15917. if (typeof(this.doc) != 'undefined') {
  15918. docRef = this.doc;
  15919. }
  15920. doc = load("tablesection");
  15921. nodeList = doc.getElementsByTagName("thead");
  15922. test.equal(nodeList.length, 1, 'Asize');
  15923. testNode = nodeList.item(0);
  15924. {
  15925. success = false;
  15926. try {
  15927. testNode.deleteRow(2);
  15928. }
  15929. catch(ex) {
  15930. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  15931. }
  15932. test.ok(success, 'HTMLTableSectionElement27');
  15933. }
  15934. test.done();
  15935. },
  15936. /**
  15937. *
  15938. The deleteRow() method throws a INDEX_SIZE_ERR DOMException
  15939. if the specified index is equal to the number of rows.
  15940. Retrieve the first THEAD element which has one row. Try
  15941. to delete a row using an index of 1. This should throw
  15942. a INDEX_SIZE_ERR DOMException since the index is equal to the
  15943. number of rows.
  15944. * @author NIST
  15945. * @author Rick Rivello
  15946. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626
  15947. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-5625626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  15948. */
  15949. HTMLTableSectionElement28: function(test) {
  15950. var success;
  15951. var nodeList;
  15952. var testNode;
  15953. var doc;
  15954. var docRef = null;
  15955. if (typeof(this.doc) != 'undefined') {
  15956. docRef = this.doc;
  15957. }
  15958. doc = load("tablesection");
  15959. nodeList = doc.getElementsByTagName("thead");
  15960. test.equal(nodeList.length, 1, 'Asize');
  15961. testNode = nodeList.item(0);
  15962. {
  15963. success = false;
  15964. try {
  15965. testNode.deleteRow(1);
  15966. }
  15967. catch(ex) {
  15968. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  15969. }
  15970. test.ok(success, 'HTMLTableSectionElement28');
  15971. }
  15972. test.done();
  15973. },
  15974. /**
  15975. *
  15976. The deleteRow() method throws a INDEX_SIZE_ERR DOMException
  15977. if the specified index is negative.
  15978. Retrieve the first THEAD element which has one row. Try
  15979. to delete a row using an index of negative two. This should throw
  15980. a INDEX_SIZE_ERR DOMException since the index is negative.
  15981. * @author NIST
  15982. * @author Rick Rivello
  15983. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626
  15984. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-5625626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
  15985. */
  15986. HTMLTableSectionElement29: function(test) {
  15987. var success;
  15988. var nodeList;
  15989. var testNode;
  15990. var doc;
  15991. var docRef = null;
  15992. if (typeof(this.doc) != 'undefined') {
  15993. docRef = this.doc;
  15994. }
  15995. doc = load("tablesection");
  15996. nodeList = doc.getElementsByTagName("thead");
  15997. test.equal(nodeList.length, 1, 'Asize');
  15998. testNode = nodeList.item(0);
  15999. {
  16000. success = false;
  16001. try {
  16002. testNode.deleteRow(-2);
  16003. }
  16004. catch(ex) {
  16005. success = (typeof(ex.code) != 'undefined' && ex.code == 1);
  16006. }
  16007. test.ok(success, 'HTMLTableSectionElement29');
  16008. }
  16009. test.done();
  16010. },
  16011. /**
  16012. *
  16013. The insertRow() method inserts a new empty table row. The new
  16014. row is inserted immediately before the current indexth row in this
  16015. section. If index is -1 or equal to the number of rows in this section,
  16016. the new row is appended.
  16017. Retrieve the first THEAD element and invoke the insertRow() method
  16018. with an index of negative one. Since the index is negative one the
  16019. new row is appended.
  16020. After the new row is appended the number of rows in the THEAD
  16021. section is two.
  16022. * @author NIST
  16023. * @author Rick Rivello
  16024. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626
  16025. */
  16026. HTMLTableSectionElement30: function(test) {
  16027. var success;
  16028. var nodeList;
  16029. var testNode;
  16030. var newRow;
  16031. var rowsnodeList;
  16032. var vrows;
  16033. var doc;
  16034. var docRef = null;
  16035. if (typeof(this.doc) != 'undefined') {
  16036. docRef = this.doc;
  16037. }
  16038. doc = load("tablesection");
  16039. nodeList = doc.getElementsByTagName("thead");
  16040. test.equal(nodeList.length, 1, 'Asize');
  16041. testNode = nodeList.item(0);
  16042. rowsnodeList = testNode.rows;
  16043. vrows = rowsnodeList.length;
  16044. test.equal(vrows, 1, "rowsLink1");
  16045. newRow = testNode.insertRow(-1);
  16046. rowsnodeList = testNode.rows;
  16047. vrows = rowsnodeList.length;
  16048. test.equal(vrows, 2, "rowsLink2");
  16049. test.done();
  16050. },
  16051. /**
  16052. *
  16053. The deleteRow() method deletes a row from this section. The index
  16054. starts from 0 and is relative only to the rows contained inside
  16055. this section, not all the rows in the table. If the index is -1
  16056. the last row will be deleted.
  16057. Retrieve the second TBODY element and invoke the deleteRow() method
  16058. with an index of -1. The nuber of rows in the THEAD section before
  16059. the deletion of the row is two. After the row is deleted the number
  16060. of rows in the TBODY section is one.
  16061. * @author NIST
  16062. * @author Rick Rivello
  16063. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626
  16064. */
  16065. HTMLTableSectionElement31: function(test) {
  16066. var success;
  16067. var nodeList;
  16068. var testNode;
  16069. var rowsnodeList;
  16070. var vrows;
  16071. var doc;
  16072. var docRef = null;
  16073. if (typeof(this.doc) != 'undefined') {
  16074. docRef = this.doc;
  16075. }
  16076. doc = load("tablesection");
  16077. nodeList = doc.getElementsByTagName("tbody");
  16078. test.equal(nodeList.length, 2, 'Asize');
  16079. testNode = nodeList.item(1);
  16080. rowsnodeList = testNode.rows;
  16081. vrows = rowsnodeList.length;
  16082. test.equal(vrows, 2, "rowsLink1");
  16083. testNode.deleteRow(-1);
  16084. rowsnodeList = testNode.rows;
  16085. vrows = rowsnodeList.length;
  16086. test.equal(vrows, 1, "rowsLink2");
  16087. test.done();
  16088. },
  16089. /**
  16090. *
  16091. The defaultValue attribute represents the HTML value of the attribute
  16092. when the type attribute has the value of "Text", "File" or "Password".
  16093. Retrieve the defaultValue attribute of the 2nd TEXTAREA element and examine
  16094. its value.
  16095. * @author NIST
  16096. * @author Mary Brady
  16097. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36152213
  16098. */
  16099. HTMLTextAreaElement01: function(test) {
  16100. var success;
  16101. var nodeList;
  16102. var testNode;
  16103. var vdefaultvalue;
  16104. var doc;
  16105. var docRef = null;
  16106. if (typeof(this.doc) != 'undefined') {
  16107. docRef = this.doc;
  16108. }
  16109. doc = load("textarea");
  16110. nodeList = doc.getElementsByTagName("textarea");
  16111. test.equal(nodeList.length, 3, 'Asize');
  16112. testNode = nodeList.item(1);
  16113. vdefaultvalue = testNode.defaultValue;
  16114. test.equal(vdefaultvalue, "TEXTAREA2", "defaultValueLink");
  16115. test.done();
  16116. },
  16117. /**
  16118. *
  16119. The form attribute returns the FORM element containing this control.
  16120. Retrieve the form attribute from the first TEXTAREA element
  16121. and examine its value.
  16122. * @author NIST
  16123. * @author Mary Brady
  16124. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18911464
  16125. */
  16126. HTMLTextAreaElement02: function(test) {
  16127. var success;
  16128. var nodeList;
  16129. var testNode;
  16130. var vform;
  16131. var fNode;
  16132. var doc;
  16133. var docRef = null;
  16134. if (typeof(this.doc) != 'undefined') {
  16135. docRef = this.doc;
  16136. }
  16137. doc = load("textarea");
  16138. nodeList = doc.getElementsByTagName("textarea");
  16139. test.equal(nodeList.length, 3, 'Asize');
  16140. testNode = nodeList.item(0);
  16141. fNode = testNode.form;
  16142. vform = fNode.id;
  16143. test.equal(vform, "form1", "formLink");
  16144. test.done();
  16145. },
  16146. /**
  16147. *
  16148. The form attribute returns null if control in not within the context of
  16149. a form.
  16150. Retrieve the second TEXTAREA element and
  16151. examine its form element.
  16152. * @author NIST
  16153. * @author Mary Brady
  16154. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18911464
  16155. */
  16156. HTMLTextAreaElement03: function(test) {
  16157. var success;
  16158. var nodeList;
  16159. var testNode;
  16160. var vform;
  16161. var doc;
  16162. var docRef = null;
  16163. if (typeof(this.doc) != 'undefined') {
  16164. docRef = this.doc;
  16165. }
  16166. doc = load("textarea");
  16167. nodeList = doc.getElementsByTagName("textarea");
  16168. test.equal(nodeList.length, 3, 'Asize');
  16169. testNode = nodeList.item(1);
  16170. vform = testNode.form;
  16171. test.equal(vform, null, 'vform should be null');
  16172. test.done();
  16173. },
  16174. /**
  16175. *
  16176. The accessKey attribute specifies a single character access key to
  16177. give access to the form control.
  16178. Retrieve the accessKey attribute of the 1st TEXTAREA element and examine
  16179. its value.
  16180. * @author NIST
  16181. * @author Mary Brady
  16182. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93102991
  16183. */
  16184. HTMLTextAreaElement04: function(test) {
  16185. var success;
  16186. var nodeList;
  16187. var testNode;
  16188. var vaccesskey;
  16189. var doc;
  16190. var docRef = null;
  16191. if (typeof(this.doc) != 'undefined') {
  16192. docRef = this.doc;
  16193. }
  16194. doc = load("textarea");
  16195. nodeList = doc.getElementsByTagName("textarea");
  16196. test.equal(nodeList.length, 3, 'Asize');
  16197. testNode = nodeList.item(0);
  16198. vaccesskey = testNode.accessKey;
  16199. test.equal(vaccesskey, "c", "accessKeyLink");
  16200. test.done();
  16201. },
  16202. /**
  16203. *
  16204. The cols attribute specifies the width of control(in characters).
  16205. Retrieve the cols attribute of the 1st TEXTAREA element and examine
  16206. its value.
  16207. * @author NIST
  16208. * @author Mary Brady
  16209. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-51387225
  16210. */
  16211. HTMLTextAreaElement05: function(test) {
  16212. var success;
  16213. var nodeList;
  16214. var testNode;
  16215. var vcols;
  16216. var doc;
  16217. var docRef = null;
  16218. if (typeof(this.doc) != 'undefined') {
  16219. docRef = this.doc;
  16220. }
  16221. doc = load("textarea");
  16222. nodeList = doc.getElementsByTagName("textarea");
  16223. test.equal(nodeList.length, 3, 'Asize');
  16224. testNode = nodeList.item(0);
  16225. vcols = testNode.cols;
  16226. test.equal(vcols, 20, "colsLink");
  16227. test.done();
  16228. },
  16229. /**
  16230. *
  16231. The disabled attribute specifies the control is unavailable in this
  16232. context.
  16233. Retrieve the disabled attribute from the 2nd TEXTAREA element and
  16234. examine its value.
  16235. * @author NIST
  16236. * @author Mary Brady
  16237. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98725443
  16238. */
  16239. HTMLTextAreaElement06: function(test) {
  16240. var success;
  16241. var nodeList;
  16242. var testNode;
  16243. var vdisabled;
  16244. var doc;
  16245. var docRef = null;
  16246. if (typeof(this.doc) != 'undefined') {
  16247. docRef = this.doc;
  16248. }
  16249. doc = load("textarea");
  16250. nodeList = doc.getElementsByTagName("textarea");
  16251. test.equal(nodeList.length, 3, 'Asize');
  16252. testNode = nodeList.item(1);
  16253. vdisabled = testNode.disabled;
  16254. test.ok(vdisabled, 'disabledLink');
  16255. test.done();
  16256. },
  16257. /**
  16258. *
  16259. The name attribute specifies the form control or object name when
  16260. submitted with a form.
  16261. Retrieve the name attribute of the 1st TEXTAREA element and examine
  16262. its value.
  16263. * @author NIST
  16264. * @author Mary Brady
  16265. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70715578
  16266. */
  16267. HTMLTextAreaElement07: function(test) {
  16268. var success;
  16269. var nodeList;
  16270. var testNode;
  16271. var vname;
  16272. var doc;
  16273. var docRef = null;
  16274. if (typeof(this.doc) != 'undefined') {
  16275. docRef = this.doc;
  16276. }
  16277. doc = load("textarea");
  16278. nodeList = doc.getElementsByTagName("textarea");
  16279. test.equal(nodeList.length, 3, 'Asize');
  16280. testNode = nodeList.item(0);
  16281. vname = testNode.name;
  16282. test.equal(vname, "text1", "nameLink");
  16283. test.done();
  16284. },
  16285. /**
  16286. *
  16287. The readOnly attribute specifies this control is read-only.
  16288. Retrieve the readOnly attribute from the 3rd TEXTAREA element and
  16289. examine its value.
  16290. * @author NIST
  16291. * @author Mary Brady
  16292. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39131423
  16293. */
  16294. HTMLTextAreaElement08: function(test) {
  16295. var success;
  16296. var nodeList;
  16297. var testNode;
  16298. var vreadonly;
  16299. var doc;
  16300. var docRef = null;
  16301. if (typeof(this.doc) != 'undefined') {
  16302. docRef = this.doc;
  16303. }
  16304. doc = load("textarea");
  16305. nodeList = doc.getElementsByTagName("textarea");
  16306. test.equal(nodeList.length, 3, 'Asize');
  16307. testNode = nodeList.item(2);
  16308. vreadonly = testNode.readOnly;
  16309. test.ok(vreadonly, 'readOnlyLink');
  16310. test.done();
  16311. },
  16312. /**
  16313. *
  16314. The rows attribute specifies the number of text rowns.
  16315. Retrieve the rows attribute of the 1st TEXTAREA element and examine
  16316. its value.
  16317. * @author NIST
  16318. * @author Mary Brady
  16319. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46975887
  16320. */
  16321. HTMLTextAreaElement09: function(test) {
  16322. var success;
  16323. var nodeList;
  16324. var testNode;
  16325. var vrows;
  16326. var doc;
  16327. var docRef = null;
  16328. if (typeof(this.doc) != 'undefined') {
  16329. docRef = this.doc;
  16330. }
  16331. doc = load("textarea");
  16332. nodeList = doc.getElementsByTagName("textarea");
  16333. test.equal(nodeList.length, 3, 'Asize');
  16334. testNode = nodeList.item(0);
  16335. vrows = testNode.rows;
  16336. test.equal(vrows, 7, "rowsLink");
  16337. test.done();
  16338. },
  16339. /**
  16340. *
  16341. The tabIndex attribute is an index that represents the element's position
  16342. in the tabbing order.
  16343. Retrieve the tabIndex attribute of the 1st TEXTAREA element and examine
  16344. its value.
  16345. * @author NIST
  16346. * @author Mary Brady
  16347. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-60363303
  16348. */
  16349. HTMLTextAreaElement10: function(test) {
  16350. var success;
  16351. var nodeList;
  16352. var testNode;
  16353. var vtabindex;
  16354. var doc;
  16355. var docRef = null;
  16356. if (typeof(this.doc) != 'undefined') {
  16357. docRef = this.doc;
  16358. }
  16359. doc = load("textarea");
  16360. nodeList = doc.getElementsByTagName("textarea");
  16361. test.equal(nodeList.length, 3, 'Asize');
  16362. testNode = nodeList.item(0);
  16363. vtabindex = testNode.tabIndex;
  16364. test.equal(vtabindex, 5, "tabIndexLink");
  16365. test.done();
  16366. },
  16367. /**
  16368. *
  16369. The type attribute specifies the type of this form control.
  16370. Retrieve the type attribute of the 1st TEXTAREA element and examine
  16371. its value.
  16372. * @author NIST
  16373. * @author Mary Brady
  16374. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-24874179
  16375. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLTextAreaElement-type
  16376. */
  16377. HTMLTextAreaElement11: function(test) {
  16378. var success;
  16379. var nodeList;
  16380. var testNode;
  16381. var vtype;
  16382. var doc;
  16383. var docRef = null;
  16384. if (typeof(this.doc) != 'undefined') {
  16385. docRef = this.doc;
  16386. }
  16387. doc = load("textarea");
  16388. nodeList = doc.getElementsByTagName("textarea");
  16389. test.equal(nodeList.length, 3, 'Asize');
  16390. testNode = nodeList.item(0);
  16391. vtype = testNode.type;
  16392. test.equal(vtype, "textarea", "typeLink");
  16393. test.done();
  16394. },
  16395. /**
  16396. *
  16397. The value attribute represents the current contents of the corresponding
  16398. form control, in an interactive user agent.
  16399. Retrieve the value attribute of the 1st TEXTAREA element and examine
  16400. its value.
  16401. * @author NIST
  16402. * @author Mary Brady
  16403. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70715579
  16404. */
  16405. HTMLTextAreaElement12: function(test) {
  16406. var success;
  16407. var nodeList;
  16408. var testNode;
  16409. var vvalue;
  16410. var doc;
  16411. var docRef = null;
  16412. if (typeof(this.doc) != 'undefined') {
  16413. docRef = this.doc;
  16414. }
  16415. doc = load("textarea");
  16416. nodeList = doc.getElementsByTagName("textarea");
  16417. test.equal(nodeList.length, 3, 'Asize');
  16418. testNode = nodeList.item(0);
  16419. vvalue = testNode.value;
  16420. test.equal(vvalue, "TEXTAREA1", "valueLink");
  16421. test.done();
  16422. },
  16423. /**
  16424. *
  16425. Calling HTMLTextAreaElement.blur should surrender input focus.
  16426. * @author Curt Arnold
  16427. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6750689
  16428. */
  16429. HTMLTextAreaElement13: function(test) {
  16430. var success;
  16431. var nodeList;
  16432. var testNode;
  16433. var doc;
  16434. var docRef = null;
  16435. if (typeof(this.doc) != 'undefined') {
  16436. docRef = this.doc;
  16437. }
  16438. doc = load("textarea");
  16439. nodeList = doc.getElementsByTagName("textarea");
  16440. test.equal(nodeList.length, 3, 'Asize');
  16441. testNode = nodeList.item(0);
  16442. testNode.blur();
  16443. test.done();
  16444. },
  16445. /**
  16446. *
  16447. Calling HTMLTextAreaElement.focus should capture input focus.
  16448. * @author Curt Arnold
  16449. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39055426
  16450. */
  16451. HTMLTextAreaElement14: function(test) {
  16452. var success;
  16453. var nodeList;
  16454. var testNode;
  16455. var doc;
  16456. var docRef = null;
  16457. if (typeof(this.doc) != 'undefined') {
  16458. docRef = this.doc;
  16459. }
  16460. doc = load("textarea");
  16461. nodeList = doc.getElementsByTagName("textarea");
  16462. test.equal(nodeList.length, 3, 'Asize');
  16463. testNode = nodeList.item(0);
  16464. testNode.focus();
  16465. test.done();
  16466. },
  16467. /**
  16468. *
  16469. Calling HTMLTextAreaElement.select should select the text area.
  16470. * @author Curt Arnold
  16471. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48880622
  16472. */
  16473. HTMLTextAreaElement15: function(test) {
  16474. var success;
  16475. var nodeList;
  16476. var testNode;
  16477. var doc;
  16478. var docRef = null;
  16479. if (typeof(this.doc) != 'undefined') {
  16480. docRef = this.doc;
  16481. }
  16482. doc = load("textarea");
  16483. nodeList = doc.getElementsByTagName("textarea");
  16484. test.equal(nodeList.length, 3, 'Asize');
  16485. testNode = nodeList.item(0);
  16486. testNode.select();
  16487. test.done();
  16488. },
  16489. /**
  16490. *
  16491. The text attribute is the specified title as a string.
  16492. Retrieve the text attribute and examine its value.
  16493. * @author NIST
  16494. * @author Mary Brady
  16495. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77500413
  16496. */
  16497. HTMLTitleElement01: function(test) {
  16498. var success;
  16499. var nodeList;
  16500. var testNode;
  16501. var vtext;
  16502. var doc;
  16503. var docRef = null;
  16504. if (typeof(this.doc) != 'undefined') {
  16505. docRef = this.doc;
  16506. }
  16507. doc = load("title");
  16508. nodeList = doc.getElementsByTagName("title");
  16509. test.equal(nodeList.length, 1, 'Asize');
  16510. testNode = nodeList.item(0);
  16511. vtext = testNode.text;
  16512. test.equal(vtext, "NIST DOM HTML Test - TITLE", "textLink");
  16513. test.done();
  16514. },
  16515. /**
  16516. *
  16517. The compact attribute specifies whether to reduce spacing between list
  16518. items.
  16519. Retrieve the compact attribute and examine its value.
  16520. * @author NIST
  16521. * @author Mary Brady
  16522. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39864178
  16523. */
  16524. HTMLUListElement01: function(test) {
  16525. var success;
  16526. var nodeList;
  16527. var testNode;
  16528. var vcompact;
  16529. var doc;
  16530. var docRef = null;
  16531. if (typeof(this.doc) != 'undefined') {
  16532. docRef = this.doc;
  16533. }
  16534. doc = load("ulist");
  16535. nodeList = doc.getElementsByTagName("ul");
  16536. test.equal(nodeList.length, 2, 'Asize');
  16537. testNode = nodeList.item(0);
  16538. vcompact = testNode.compact;
  16539. test.ok(vcompact, 'compactLink');
  16540. test.done();
  16541. },
  16542. /**
  16543. *
  16544. The type attribute specifies the bullet style.
  16545. Retrieve the type attribute and examine its value.
  16546. * @author NIST
  16547. * @author Mary Brady
  16548. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96874670
  16549. */
  16550. HTMLUListElement02: function(test) {
  16551. var success;
  16552. var nodeList;
  16553. var testNode;
  16554. var vtype;
  16555. var doc;
  16556. var docRef = null;
  16557. if (typeof(this.doc) != 'undefined') {
  16558. docRef = this.doc;
  16559. }
  16560. doc = load("ulist");
  16561. nodeList = doc.getElementsByTagName("ul");
  16562. test.equal(nodeList.length, 2, 'Asize');
  16563. testNode = nodeList.item(0);
  16564. vtype = testNode.type;
  16565. test.equal(vtype, "disc", "typeLink");
  16566. test.done();
  16567. },
  16568. /**
  16569. *
  16570. A single character access key to give access to the form control.
  16571. The value of attribute accessKey of the anchor element is read and checked against the expected value.
  16572. * @author Netscape
  16573. * @author Sivakiran Tummala
  16574. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89647724
  16575. */
  16576. anchor01: function(test) {
  16577. var success;
  16578. var nodeList;
  16579. var testNode;
  16580. var vaccesskey;
  16581. var doc;
  16582. var docRef = null;
  16583. if (typeof(this.doc) != 'undefined') {
  16584. docRef = this.doc;
  16585. }
  16586. doc = load("anchor");
  16587. nodeList = doc.getElementsByTagName("a");
  16588. test.equal(nodeList.length, 1, 'Asize');
  16589. testNode = nodeList.item(0);
  16590. vaccesskey = testNode.accessKey;
  16591. test.equal(vaccesskey, "g", "accessKeyLink");
  16592. test.done();
  16593. },
  16594. /**
  16595. *
  16596. The character encoding of the linked resource.
  16597. The value of attribute charset of the anchor element is read and checked against the expected value.
  16598. * @author Netscape
  16599. * @author Sivakiran Tummala
  16600. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67619266
  16601. */
  16602. anchor02: function(test) {
  16603. var success;
  16604. var nodeList;
  16605. var testNode;
  16606. var vcharset;
  16607. var doc;
  16608. var docRef = null;
  16609. if (typeof(this.doc) != 'undefined') {
  16610. docRef = this.doc;
  16611. }
  16612. doc = load("anchor");
  16613. nodeList = doc.getElementsByTagName("a");
  16614. test.equal(nodeList.length, 1, 'Asize');
  16615. testNode = nodeList.item(0);
  16616. vcharset = testNode.charset;
  16617. test.equal(vcharset, "US-ASCII", "charsetLink");
  16618. test.done();
  16619. },
  16620. /**
  16621. *
  16622. Comma-separated list of lengths, defining an active region geometry.
  16623. The value of attribute coords of the anchor element is read and checked against the expected value.
  16624. * @author Netscape
  16625. * @author Sivakiran Tummala
  16626. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92079539
  16627. */
  16628. anchor03: function(test) {
  16629. var success;
  16630. var nodeList;
  16631. var testNode;
  16632. var vcoords;
  16633. var doc;
  16634. var docRef = null;
  16635. if (typeof(this.doc) != 'undefined') {
  16636. docRef = this.doc;
  16637. }
  16638. doc = load("anchor");
  16639. nodeList = doc.getElementsByTagName("a");
  16640. test.equal(nodeList.length, 1, 'Asize');
  16641. testNode = nodeList.item(0);
  16642. vcoords = testNode.coords;
  16643. test.equal(vcoords, "0,0,100,100", "coordsLink");
  16644. test.done();
  16645. },
  16646. /**
  16647. *
  16648. The URI of the linked resource.
  16649. The value of attribute href of the anchor element is read and checked against the expected value.
  16650. * @author Netscape
  16651. * @author Sivakiran Tummala
  16652. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88517319
  16653. */
  16654. anchor04: function(test) {
  16655. var success;
  16656. var nodeList;
  16657. var testNode;
  16658. var vhref;
  16659. var doc;
  16660. var docRef = null;
  16661. if (typeof(this.doc) != 'undefined') {
  16662. docRef = this.doc;
  16663. }
  16664. doc = load("anchor");
  16665. nodeList = doc.getElementsByTagName("a");
  16666. test.equal(nodeList.length, 1, 'Asize');
  16667. testNode = nodeList.item(0);
  16668. vhref = testNode.href;
  16669. test.equal(vhref, 'file://'+__dirname+'/html/files/pix/submit.gif', 'hrefLink');
  16670. test.done();
  16671. },
  16672. /**
  16673. *
  16674. Advisory content type.
  16675. The value of attribute type of the anchor element is read and checked against the expected value.
  16676. * @author Netscape
  16677. * @author Sivakiran Tummala
  16678. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63938221
  16679. */
  16680. anchor05: function(test) {
  16681. var success;
  16682. var nodeList;
  16683. var testNode;
  16684. var vtype;
  16685. var doc;
  16686. var docRef = null;
  16687. if (typeof(this.doc) != 'undefined') {
  16688. docRef = this.doc;
  16689. }
  16690. doc = load("anchor");
  16691. nodeList = doc.getElementsByTagName("a");
  16692. test.equal(nodeList.length, 1, 'Asize');
  16693. testNode = nodeList.item(0);
  16694. vtype = testNode.type;
  16695. test.equal(vtype, "image/gif", "typeLink");
  16696. test.done();
  16697. },
  16698. /**
  16699. *
  16700. The shape of the active area. The coordinates are given by coords
  16701. The value of attribute shape of the anchor element is read and checked against the expected value.
  16702. * @author Netscape
  16703. * @author Sivakiran Tummala
  16704. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49899808
  16705. */
  16706. anchor06: function(test) {
  16707. var success;
  16708. var nodeList;
  16709. var testNode;
  16710. var vshape;
  16711. var doc;
  16712. var docRef = null;
  16713. if (typeof(this.doc) != 'undefined') {
  16714. docRef = this.doc;
  16715. }
  16716. doc = load("anchor");
  16717. nodeList = doc.getElementsByTagName("a");
  16718. test.equal(nodeList.length, 1, 'Asize');
  16719. testNode = nodeList.item(0);
  16720. vshape = testNode.shape;
  16721. test.equal(vshape, "rect", "shapeLink");
  16722. test.done();
  16723. },
  16724. /**
  16725. *
  16726. * @author Netscape
  16727. * @author Sivakiran Tummala
  16728. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66021476
  16729. */
  16730. area01: function(test) {
  16731. var success;
  16732. var nodeList;
  16733. var testNode;
  16734. var vcoords;
  16735. var doc;
  16736. var docRef = null;
  16737. if (typeof(this.doc) != 'undefined') {
  16738. docRef = this.doc;
  16739. }
  16740. doc = load("area");
  16741. nodeList = doc.getElementsByTagName("area");
  16742. test.equal(nodeList.length, 1, 'Asize');
  16743. testNode = nodeList.item(0);
  16744. vcoords = testNode.coords;
  16745. test.equal(vcoords, "0,2,45,45", "coordsLink");
  16746. test.done();
  16747. },
  16748. /**
  16749. *
  16750. * @author Netscape
  16751. * @author Sivakiran Tummala
  16752. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61826871
  16753. */
  16754. area02: function(test) {
  16755. var success;
  16756. var nodeList;
  16757. var testNode;
  16758. var vnohref;
  16759. var doc;
  16760. var docRef = null;
  16761. if (typeof(this.doc) != 'undefined') {
  16762. docRef = this.doc;
  16763. }
  16764. doc = load("area");
  16765. nodeList = doc.getElementsByTagName("area");
  16766. test.equal(nodeList.length, 1, 'Asize');
  16767. testNode = nodeList.item(0);
  16768. vnohref = testNode.noHref;
  16769. test.equal(vnohref, false, 'vnohref should be *false*');
  16770. test.done();
  16771. },
  16772. /**
  16773. *
  16774. * @author Netscape
  16775. * @author Sivakiran Tummala
  16776. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8722121
  16777. */
  16778. area03: function(test) {
  16779. var success;
  16780. var nodeList;
  16781. var testNode;
  16782. var vtabindex;
  16783. var doc;
  16784. var docRef = null;
  16785. if (typeof(this.doc) != 'undefined') {
  16786. docRef = this.doc;
  16787. }
  16788. doc = load("area");
  16789. nodeList = doc.getElementsByTagName("area");
  16790. test.equal(nodeList.length, 1, 'Asize');
  16791. testNode = nodeList.item(0);
  16792. vtabindex = testNode.tabIndex;
  16793. test.equal(vtabindex, 10, "tabIndexLink");
  16794. test.done();
  16795. },
  16796. /**
  16797. *
  16798. * @author Netscape
  16799. * @author Sivakiran Tummala
  16800. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57944457
  16801. */
  16802. area04: function(test) {
  16803. var success;
  16804. var nodeList;
  16805. var testNode;
  16806. var vaccesskey;
  16807. var doc;
  16808. var docRef = null;
  16809. if (typeof(this.doc) != 'undefined') {
  16810. docRef = this.doc;
  16811. }
  16812. doc = load("area");
  16813. nodeList = doc.getElementsByTagName("area");
  16814. test.equal(nodeList.length, 1, 'Asize');
  16815. testNode = nodeList.item(0);
  16816. vaccesskey = testNode.accessKey;
  16817. test.equal(vaccesskey, "a", "accessKeyLink");
  16818. test.done();
  16819. },
  16820. /**
  16821. *
  16822. The value of attribute color of the basefont element is read and checked against the expected value.
  16823. * @author Netscape
  16824. * @author Sivakiran Tummala
  16825. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87502302
  16826. */
  16827. basefont01: function(test) {
  16828. var success;
  16829. var nodeList;
  16830. var testNode;
  16831. var vcolor;
  16832. var doc;
  16833. var docRef = null;
  16834. if (typeof(this.doc) != 'undefined') {
  16835. docRef = this.doc;
  16836. }
  16837. doc = load("basefont");
  16838. nodeList = doc.getElementsByTagName("basefont");
  16839. test.equal(nodeList.length, 1, 'Asize');
  16840. testNode = nodeList.item(0);
  16841. vcolor = testNode.color;
  16842. test.equal(vcolor, "#000000", "colorLink");
  16843. test.done();
  16844. },
  16845. /**
  16846. *
  16847. Color of active links (after mouse-button down, but before mouse-button up).
  16848. The value of attribute alink of the body element is read and checked against the expected value.
  16849. * @author Netscape
  16850. * @author Sivakiran Tummala
  16851. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59424581
  16852. */
  16853. body01: function(test) {
  16854. var success;
  16855. var nodeList;
  16856. var testNode;
  16857. var valink;
  16858. var doc;
  16859. var docRef = null;
  16860. if (typeof(this.doc) != 'undefined') {
  16861. docRef = this.doc;
  16862. }
  16863. doc = load("body");
  16864. nodeList = doc.getElementsByTagName("body");
  16865. test.equal(nodeList.length, 1, 'Asize');
  16866. testNode = nodeList.item(0);
  16867. valink = testNode.aLink;
  16868. test.equal(valink, "#0000ff", "aLinkLink");
  16869. test.done();
  16870. },
  16871. /**
  16872. *
  16873. Returns the FORM element containing this control. Returns null if this control is not within the context of a form.
  16874. * @author Netscape
  16875. * @author Sivakiran Tummala
  16876. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
  16877. */
  16878. button01: function(test) {
  16879. var success;
  16880. var nodeList;
  16881. var testNode;
  16882. var vform;
  16883. var doc;
  16884. var docRef = null;
  16885. if (typeof(this.doc) != 'undefined') {
  16886. docRef = this.doc;
  16887. }
  16888. doc = load("button");
  16889. nodeList = doc.getElementsByTagName("button");
  16890. test.equal(nodeList.length, 2, 'Asize');
  16891. testNode = nodeList.item(1);
  16892. vform = testNode.form;
  16893. test.equal(vform, null, 'vform should be null');
  16894. test.done();
  16895. },
  16896. /**
  16897. *
  16898. The value of attribute name of the form element which contains this button is read and checked against the expected value.
  16899. * @author Netscape
  16900. * @author Sivakiran Tummala
  16901. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
  16902. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
  16903. */
  16904. button02: function(test) {
  16905. var success;
  16906. var nodeList;
  16907. var testNode;
  16908. var formNode;
  16909. var vfname;
  16910. var doc;
  16911. var docRef = null;
  16912. if (typeof(this.doc) != 'undefined') {
  16913. docRef = this.doc;
  16914. }
  16915. doc = load("button");
  16916. nodeList = doc.getElementsByTagName("button");
  16917. test.equal(nodeList.length, 2, 'Asize');
  16918. testNode = nodeList.item(0);
  16919. formNode = testNode.form;
  16920. vfname = formNode.id;
  16921. test.equal(vfname, "form2", "formLink");
  16922. test.done();
  16923. },
  16924. /**
  16925. *
  16926. The value of attribute action of the form element which contains this button is read and checked against the expected value
  16927. * @author Netscape
  16928. * @author Sivakiran Tummala
  16929. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
  16930. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74049184
  16931. */
  16932. button03: function(test) {
  16933. var success;
  16934. var nodeList;
  16935. var testNode;
  16936. var formNode;
  16937. var vfaction;
  16938. var doc;
  16939. var docRef = null;
  16940. if (typeof(this.doc) != 'undefined') {
  16941. docRef = this.doc;
  16942. }
  16943. doc = load("button");
  16944. nodeList = doc.getElementsByTagName("button");
  16945. test.equal(nodeList.length, 2, 'Asize');
  16946. testNode = nodeList.item(0);
  16947. formNode = testNode.form;
  16948. vfaction = formNode.action;
  16949. test.equal(vfaction, "...", "formLink");
  16950. test.done();
  16951. },
  16952. /**
  16953. *
  16954. The value of attribute method of the form element which contains this button is read and checked against the expected value
  16955. * @author Netscape
  16956. * @author Sivakiran Tummala
  16957. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
  16958. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82545539
  16959. */
  16960. button04: function(test) {
  16961. var success;
  16962. var nodeList;
  16963. var testNode;
  16964. var formNode;
  16965. var vfmethod;
  16966. var doc;
  16967. var docRef = null;
  16968. if (typeof(this.doc) != 'undefined') {
  16969. docRef = this.doc;
  16970. }
  16971. doc = load("button");
  16972. nodeList = doc.getElementsByTagName("button");
  16973. test.equal(nodeList.length, 2, 'Asize');
  16974. testNode = nodeList.item(0);
  16975. formNode = testNode.form;
  16976. vfmethod = formNode.method;
  16977. test.equal(vfmethod.toLowerCase(), "POST".toLowerCase(), "formLink");
  16978. test.done();
  16979. },
  16980. /**
  16981. *
  16982. A single character access key to give access to the form control.
  16983. The value of attribute accessKey of the button element is read and checked against the expected value.
  16984. * @author Netscape
  16985. * @author Sivakiran Tummala
  16986. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73169431
  16987. */
  16988. button05: function(test) {
  16989. var success;
  16990. var nodeList;
  16991. var testNode;
  16992. var vakey;
  16993. var doc;
  16994. var docRef = null;
  16995. if (typeof(this.doc) != 'undefined') {
  16996. docRef = this.doc;
  16997. }
  16998. doc = load("button");
  16999. nodeList = doc.getElementsByTagName("button");
  17000. test.equal(nodeList.length, 2, 'Asize');
  17001. testNode = nodeList.item(0);
  17002. vakey = testNode.accessKey;
  17003. test.equal(vakey.toLowerCase(), "f".toLowerCase(), "accessKeyLink");
  17004. test.done();
  17005. },
  17006. /**
  17007. *
  17008. Index that represents the element's position in the tabbing order.
  17009. The value of attribute tabIndex of the button element is read and checked against the expected value.
  17010. * @author Netscape
  17011. * @author Sivakiran Tummala
  17012. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39190908
  17013. */
  17014. button06: function(test) {
  17015. var success;
  17016. var nodeList;
  17017. var testNode;
  17018. var vtabIndex;
  17019. var doc;
  17020. var docRef = null;
  17021. if (typeof(this.doc) != 'undefined') {
  17022. docRef = this.doc;
  17023. }
  17024. doc = load("button");
  17025. nodeList = doc.getElementsByTagName("button");
  17026. test.equal(nodeList.length, 2, 'Asize');
  17027. testNode = nodeList.item(0);
  17028. vtabIndex = testNode.tabIndex;
  17029. test.equal(vtabIndex, 20, "tabIndexLink");
  17030. test.done();
  17031. },
  17032. /**
  17033. *
  17034. The type of button
  17035. The value of attribute type of the button element is read and checked against the expected value.
  17036. * @author Netscape
  17037. * @author Sivakiran Tummala
  17038. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27430092
  17039. */
  17040. button07: function(test) {
  17041. var success;
  17042. var nodeList;
  17043. var testNode;
  17044. var vtype;
  17045. var doc;
  17046. var docRef = null;
  17047. if (typeof(this.doc) != 'undefined') {
  17048. docRef = this.doc;
  17049. }
  17050. doc = load("button");
  17051. nodeList = doc.getElementsByTagName("button");
  17052. test.equal(nodeList.length, 2, 'Asize');
  17053. testNode = nodeList.item(0);
  17054. vtype = testNode.type;
  17055. test.equal(vtype, "reset", "typeLink");
  17056. test.done();
  17057. },
  17058. /**
  17059. *
  17060. The control is unavailable in this context.
  17061. The boolean value of attribute disabled of the button element is read and checked against the expected value.
  17062. * @author Netscape
  17063. * @author Sivakiran Tummala
  17064. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92757155
  17065. */
  17066. button08: function(test) {
  17067. var success;
  17068. var nodeList;
  17069. var testNode;
  17070. var vdisabled;
  17071. var doc;
  17072. var docRef = null;
  17073. if (typeof(this.doc) != 'undefined') {
  17074. docRef = this.doc;
  17075. }
  17076. doc = load("button");
  17077. nodeList = doc.getElementsByTagName("button");
  17078. test.equal(nodeList.length, 2, 'Asize');
  17079. testNode = nodeList.item(0);
  17080. vdisabled = testNode.disabled;
  17081. test.ok(vdisabled, 'disabledLink');
  17082. test.done();
  17083. },
  17084. /**
  17085. *
  17086. The current form control value.
  17087. The value of attribute value of the button element is read and checked against the expected value.
  17088. * @author Netscape
  17089. * @author Sivakiran Tummala
  17090. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72856782
  17091. */
  17092. button09: function(test) {
  17093. var success;
  17094. var nodeList;
  17095. var testNode;
  17096. var vvalue;
  17097. var doc;
  17098. var docRef = null;
  17099. if (typeof(this.doc) != 'undefined') {
  17100. docRef = this.doc;
  17101. }
  17102. doc = load("button");
  17103. nodeList = doc.getElementsByTagName("button");
  17104. test.equal(nodeList.length, 2, 'Asize');
  17105. testNode = nodeList.item(0);
  17106. vvalue = testNode.value;
  17107. test.equal(vvalue, "Reset Disabled Button", "typeLink");
  17108. test.done();
  17109. },
  17110. /**
  17111. *
  17112. * @author Netscape
  17113. * @author Sivakiran Tummala
  17114. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21738539
  17115. */
  17116. dlist01: function(test) {
  17117. var success;
  17118. var nodeList;
  17119. var testNode;
  17120. var vcompact;
  17121. var doc;
  17122. var docRef = null;
  17123. if (typeof(this.doc) != 'undefined') {
  17124. docRef = this.doc;
  17125. }
  17126. doc = load("dl");
  17127. nodeList = doc.getElementsByTagName("dl");
  17128. test.equal(nodeList.length, 1, 'Asize');
  17129. testNode = nodeList.item(0);
  17130. vcompact = testNode.compact;
  17131. test.ok(vcompact, 'compactLink');
  17132. test.done();
  17133. },
  17134. /**
  17135. *
  17136. Retrieve the title attribute of HTMLDocument and examine it's value.
  17137. * @author Netscape
  17138. * @author Sivakiran Tummala
  17139. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18446827
  17140. */
  17141. doc01: function(test) {
  17142. var success;
  17143. var vtitle;
  17144. var doc;
  17145. var docRef = null;
  17146. if (typeof(this.doc) != 'undefined') {
  17147. docRef = this.doc;
  17148. }
  17149. doc = load("anchor");
  17150. vtitle = doc.title;
  17151. test.equal(vtitle, "NIST DOM HTML Test - Anchor", "titleLink");
  17152. test.done();
  17153. },
  17154. /**
  17155. *
  17156. hasFeature("hTmL", null) should return true.
  17157. * @author Curt Arnold
  17158. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-5CED94D7
  17159. */
  17160. hasFeature01: function(test) {
  17161. var success;
  17162. var doc;
  17163. var domImpl;
  17164. var version = null;
  17165. var state;
  17166. domImpl = getImplementation();
  17167. state = domImpl.hasFeature("hTmL",version);
  17168. test.ok(state, 'hasHTMLnull');
  17169. test.done();
  17170. },
  17171. /**
  17172. *
  17173. hasFeature("hTmL", "2.0") should return true.
  17174. * @author Curt Arnold
  17175. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
  17176. */
  17177. hasFeature02: function(test) {
  17178. var success;
  17179. var doc;
  17180. var domImpl;
  17181. var version = "2.0";
  17182. var state;
  17183. domImpl = getImplementation();
  17184. state = domImpl.hasFeature("hTmL",version);
  17185. test.ok(state, 'hasHTML2');
  17186. test.done();
  17187. },
  17188. /**
  17189. *
  17190. hasFeature("xhTmL", null) should return true if hasFeature("XML", null) returns true.
  17191. * @author Curt Arnold
  17192. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
  17193. */
  17194. hasFeature03: function(test) {
  17195. var success;
  17196. var doc;
  17197. var domImpl;
  17198. var version = null;
  17199. var state;
  17200. var hasXML;
  17201. domImpl = getImplementation();
  17202. hasXML = domImpl.hasFeature("XML",version);
  17203. state = domImpl.hasFeature("xhTmL",version);
  17204. test.equal(state, hasXML, "hasXHTML");
  17205. test.done();
  17206. },
  17207. /**
  17208. *
  17209. hasFeature("xhTmL", "2.0") should return true if hasFeature("XML", "2.0") returns true.
  17210. * @author Curt Arnold
  17211. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
  17212. */
  17213. hasFeature04: function(test) {
  17214. var success;
  17215. var doc;
  17216. var domImpl;
  17217. var version = "2.0";
  17218. var state;
  17219. var hasXML;
  17220. domImpl = getImplementation();
  17221. hasXML = domImpl.hasFeature("XML",version);
  17222. state = domImpl.hasFeature("xhTmL",version);
  17223. test.equal(state, hasXML, "hasXHTML");
  17224. test.done();
  17225. },
  17226. /**
  17227. *
  17228. hasFeature("cOrE", null) should return true.
  17229. * @author Curt Arnold
  17230. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
  17231. */
  17232. hasFeature05: function(test) {
  17233. var success;
  17234. var doc;
  17235. var domImpl;
  17236. var version = null;
  17237. var state;
  17238. domImpl = getImplementation();
  17239. state = domImpl.hasFeature("cOrE",version);
  17240. test.ok(state, 'hasCore');
  17241. test.done();
  17242. },
  17243. /**
  17244. *
  17245. hasFeature("cOrE", "2.0") should return true.
  17246. * @author Curt Arnold
  17247. * @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
  17248. */
  17249. hasFeature06: function(test) {
  17250. var success;
  17251. var doc;
  17252. var domImpl;
  17253. var version = "2.0";
  17254. var state;
  17255. domImpl = getImplementation();
  17256. state = domImpl.hasFeature("cOrE",version);
  17257. test.ok(state, 'hasCore');
  17258. test.done();
  17259. },
  17260. /**
  17261. *
  17262. Returns the FORM element containing this control. Returns null if this control is not within the context of a form.
  17263. The value of attribute form of the object element is read and checked against the expected value.
  17264. * @author Netscape
  17265. * @author Sivakiran Tummala
  17266. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773
  17267. */
  17268. object01: function(test) {
  17269. var success;
  17270. var nodeList;
  17271. var testNode;
  17272. var vform;
  17273. var doc;
  17274. var docRef = null;
  17275. if (typeof(this.doc) != 'undefined') {
  17276. docRef = this.doc;
  17277. }
  17278. doc = load("object");
  17279. nodeList = doc.getElementsByTagName("object");
  17280. test.equal(nodeList.length, 2, 'Asize');
  17281. testNode = nodeList.item(0);
  17282. vform = testNode.form;
  17283. test.equal(vform, null, 'vform should be null');
  17284. test.done();
  17285. },
  17286. /**
  17287. *
  17288. Aligns this object (vertically or horizontally) with respect to its surrounding text.
  17289. The value of attribute align of the object element is read and checked against the expected value.
  17290. * @author Netscape
  17291. * @author Sivakiran Tummala
  17292. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16962097
  17293. */
  17294. object02: function(test) {
  17295. var success;
  17296. var nodeList;
  17297. var testNode;
  17298. var valign;
  17299. var doc;
  17300. var docRef = null;
  17301. if (typeof(this.doc) != 'undefined') {
  17302. docRef = this.doc;
  17303. }
  17304. doc = load("object");
  17305. nodeList = doc.getElementsByTagName("object");
  17306. test.equal(nodeList.length, 2, 'Asize');
  17307. testNode = nodeList.item(0);
  17308. valign = testNode.align;
  17309. test.equal(valign, "middle", "alignLink");
  17310. test.done();
  17311. },
  17312. /**
  17313. *
  17314. Space-separated list of archives
  17315. The value of attribute archive of the object element is read and checked against the expected value.
  17316. * @author Netscape
  17317. * @author Sivakiran Tummala
  17318. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47783837
  17319. */
  17320. object03: function(test) {
  17321. var success;
  17322. var nodeList;
  17323. var testNode;
  17324. var varchive;
  17325. var doc;
  17326. var docRef = null;
  17327. if (typeof(this.doc) != 'undefined') {
  17328. docRef = this.doc;
  17329. }
  17330. doc = load("object");
  17331. nodeList = doc.getElementsByTagName("object");
  17332. test.equal(nodeList.length, 2, 'Asize');
  17333. testNode = nodeList.item(0);
  17334. varchive = testNode.archive;
  17335. test.equal(varchive, "", "archiveLink");
  17336. test.done();
  17337. },
  17338. /**
  17339. *
  17340. Width of border around the object.
  17341. The value of attribute border of the object element is read and checked against the expected value.
  17342. * @author Netscape
  17343. * @author Sivakiran Tummala
  17344. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82818419
  17345. */
  17346. object04: function(test) {
  17347. var success;
  17348. var nodeList;
  17349. var testNode;
  17350. var vborder;
  17351. var doc;
  17352. var docRef = null;
  17353. if (typeof(this.doc) != 'undefined') {
  17354. docRef = this.doc;
  17355. }
  17356. doc = load("object");
  17357. nodeList = doc.getElementsByTagName("object");
  17358. test.equal(nodeList.length, 2, 'Asize');
  17359. testNode = nodeList.item(0);
  17360. vborder = testNode.border;
  17361. test.equal(vborder, "0", "borderLink");
  17362. test.done();
  17363. },
  17364. /**
  17365. *
  17366. Base URI for classid, data, and archive attributes.
  17367. The value of attribute codebase of the object element is read and checked against the expected value.
  17368. * @author Netscape
  17369. * @author Sivakiran Tummala
  17370. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25709136
  17371. */
  17372. object05: function(test) {
  17373. var success;
  17374. var nodeList;
  17375. var testNode;
  17376. var vcodebase;
  17377. var doc;
  17378. var docRef = null;
  17379. if (typeof(this.doc) != 'undefined') {
  17380. docRef = this.doc;
  17381. }
  17382. doc = load("object");
  17383. nodeList = doc.getElementsByTagName("object");
  17384. test.equal(nodeList.length, 2, 'Asize');
  17385. testNode = nodeList.item(0);
  17386. vcodebase = testNode.codeBase;
  17387. test.equal(vcodebase, "http://xw2k.sdct.itl.nist.gov/brady/dom/", "codebaseLink");
  17388. test.done();
  17389. },
  17390. /**
  17391. *
  17392. A URI specifying the location of the object's data.
  17393. The value of attribute data of the object element is read and checked against the expected value.
  17394. * @author Netscape
  17395. * @author Sivakiran Tummala
  17396. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-81766986
  17397. */
  17398. object06: function(test) {
  17399. var success;
  17400. var nodeList;
  17401. var testNode;
  17402. var vdata;
  17403. var doc;
  17404. var docRef = null;
  17405. if (typeof(this.doc) != 'undefined') {
  17406. docRef = this.doc;
  17407. }
  17408. doc = load("object");
  17409. nodeList = doc.getElementsByTagName("object");
  17410. test.equal(nodeList.length, 2, 'Asize');
  17411. testNode = nodeList.item(0);
  17412. vdata = testNode.data;
  17413. test.equal(vdata, "./pix/logo.gif", "dataLink");
  17414. test.done();
  17415. },
  17416. /**
  17417. *
  17418. The value of attribute height of the object element is read and checked against the expected value.
  17419. * @author Netscape
  17420. * @author Sivakiran Tummala
  17421. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88925838
  17422. */
  17423. object07: function(test) {
  17424. var success;
  17425. var nodeList;
  17426. var testNode;
  17427. var vheight;
  17428. var doc;
  17429. var docRef = null;
  17430. if (typeof(this.doc) != 'undefined') {
  17431. docRef = this.doc;
  17432. }
  17433. doc = load("object");
  17434. nodeList = doc.getElementsByTagName("object");
  17435. test.equal(nodeList.length, 2, 'Asize');
  17436. testNode = nodeList.item(0);
  17437. vheight = testNode.height;
  17438. test.equal(vheight, "60", "heightLink");
  17439. test.done();
  17440. },
  17441. /**
  17442. *
  17443. Horizontal space to the left and right of this image, applet, or object.
  17444. The value of attribute hspace of the object element is read and checked against the expected value.
  17445. * @author Netscape
  17446. * @author Sivakiran Tummala
  17447. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-17085376
  17448. */
  17449. object08: function(test) {
  17450. var success;
  17451. var nodeList;
  17452. var testNode;
  17453. var vhspace;
  17454. var doc;
  17455. var docRef = null;
  17456. if (typeof(this.doc) != 'undefined') {
  17457. docRef = this.doc;
  17458. }
  17459. doc = load("object");
  17460. nodeList = doc.getElementsByTagName("object");
  17461. test.equal(nodeList.length, 2, 'Asize');
  17462. testNode = nodeList.item(0);
  17463. vhspace = testNode.hspace;
  17464. test.equal(vhspace, 0, "hspaceLink");
  17465. test.done();
  17466. },
  17467. /**
  17468. *
  17469. Message to render while loading the object.
  17470. The value of attribute standby of the object element is read and checked against the expected value.
  17471. * @author Netscape
  17472. * @author Sivakiran Tummala
  17473. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25039673
  17474. */
  17475. object09: function(test) {
  17476. var success;
  17477. var nodeList;
  17478. var testNode;
  17479. var vstandby;
  17480. var doc;
  17481. var docRef = null;
  17482. if (typeof(this.doc) != 'undefined') {
  17483. docRef = this.doc;
  17484. }
  17485. doc = load("object");
  17486. nodeList = doc.getElementsByTagName("object");
  17487. test.equal(nodeList.length, 2, 'Asize');
  17488. testNode = nodeList.item(0);
  17489. vstandby = testNode.standby;
  17490. test.equal(vstandby, "Loading Image ...", "standbyLink");
  17491. test.done();
  17492. },
  17493. /**
  17494. *
  17495. Index that represents the element's position in the tabbing order.
  17496. The value of attribute tabIndex of the object element is read and checked against the expected value.
  17497. * @author Netscape
  17498. * @author Sivakiran Tummala
  17499. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27083787
  17500. */
  17501. object10: function(test) {
  17502. var success;
  17503. var nodeList;
  17504. var testNode;
  17505. var vtabindex;
  17506. var doc;
  17507. var docRef = null;
  17508. if (typeof(this.doc) != 'undefined') {
  17509. docRef = this.doc;
  17510. }
  17511. doc = load("object");
  17512. nodeList = doc.getElementsByTagName("object");
  17513. test.equal(nodeList.length, 2, 'Asize');
  17514. testNode = nodeList.item(0);
  17515. vtabindex = testNode.tabIndex;
  17516. test.equal(vtabindex, 0, "tabIndexLink");
  17517. test.done();
  17518. },
  17519. /**
  17520. *
  17521. Content type for data downloaded via data attribute.
  17522. The value of attribute type of the object element is read and checked against the expected value.
  17523. * @author Netscape
  17524. * @author Sivakiran Tummala
  17525. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91665621
  17526. */
  17527. object11: function(test) {
  17528. var success;
  17529. var nodeList;
  17530. var testNode;
  17531. var vtype;
  17532. var doc;
  17533. var docRef = null;
  17534. if (typeof(this.doc) != 'undefined') {
  17535. docRef = this.doc;
  17536. }
  17537. doc = load("object");
  17538. nodeList = doc.getElementsByTagName("object");
  17539. test.equal(nodeList.length, 2, 'Asize');
  17540. testNode = nodeList.item(0);
  17541. vtype = testNode.type;
  17542. test.equal(vtype, "image/gif", "typeLink");
  17543. test.done();
  17544. },
  17545. /**
  17546. *
  17547. The value of attribute usemap of the object element is read and checked against the expected value.
  17548. * @author Netscape
  17549. * @author Sivakiran Tummala
  17550. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6649772
  17551. */
  17552. object12: function(test) {
  17553. var success;
  17554. var nodeList;
  17555. var testNode;
  17556. var vusemap;
  17557. var doc;
  17558. var docRef = null;
  17559. if (typeof(this.doc) != 'undefined') {
  17560. docRef = this.doc;
  17561. }
  17562. doc = load("object");
  17563. nodeList = doc.getElementsByTagName("object");
  17564. test.equal(nodeList.length, 2, 'Asize');
  17565. testNode = nodeList.item(0);
  17566. vusemap = testNode.useMap;
  17567. test.equal(vusemap, "#DivLogo-map", "useMapLink");
  17568. test.done();
  17569. },
  17570. /**
  17571. *
  17572. Vertical space above and below this image, applet, or object.
  17573. The value of attribute vspace of the object element is read and checked against the expected value.
  17574. * @author Netscape
  17575. * @author Sivakiran Tummala
  17576. * @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-8682483
  17577. */
  17578. object13: function(test) {
  17579. var success;
  17580. var nodeList;
  17581. var testNode;
  17582. var vvspace;
  17583. var doc;
  17584. var docRef = null;
  17585. if (typeof(this.doc) != 'undefined') {
  17586. docRef = this.doc;
  17587. }
  17588. doc = load("object");
  17589. nodeList = doc.getElementsByTagName("object");
  17590. test.equal(nodeList.length, 2, 'Asize');
  17591. testNode = nodeList.item(0);
  17592. vvspace = testNode.vspace;
  17593. test.equal(vvspace, 0, "vspaceLink");
  17594. test.done();
  17595. },
  17596. /**
  17597. *
  17598. The value of attribute width of the object element is read and checked against the expected value.
  17599. * @author Netscape
  17600. * @author Sivakiran Tummala
  17601. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38538620
  17602. */
  17603. object14: function(test) {
  17604. var success;
  17605. var nodeList;
  17606. var testNode;
  17607. var vwidth;
  17608. var doc;
  17609. var docRef = null;
  17610. if (typeof(this.doc) != 'undefined') {
  17611. docRef = this.doc;
  17612. }
  17613. doc = load("object");
  17614. nodeList = doc.getElementsByTagName("object");
  17615. test.equal(nodeList.length, 2, 'Asize');
  17616. testNode = nodeList.item(0);
  17617. vwidth = testNode.width;
  17618. test.equal(vwidth, "550", "widthLink");
  17619. test.done();
  17620. },
  17621. /**
  17622. *
  17623. Content type for data downloaded via classid attribute.
  17624. The value of attribute codetype of the object element is read and checked against the expected value.
  17625. * @author Netscape
  17626. * @author Sivakiran Tummala
  17627. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19945008
  17628. */
  17629. object15: function(test) {
  17630. var success;
  17631. var nodeList;
  17632. var testNode;
  17633. var vcodetype;
  17634. var doc;
  17635. var docRef = null;
  17636. if (typeof(this.doc) != 'undefined') {
  17637. docRef = this.doc;
  17638. }
  17639. doc = load("object");
  17640. nodeList = doc.getElementsByTagName("object");
  17641. test.equal(nodeList.length, 2, 'Asize');
  17642. testNode = nodeList.item(1);
  17643. vcodetype = testNode.codeType;
  17644. test.equal(vcodetype, "image/gif", "codeTypeLink");
  17645. test.done();
  17646. },
  17647. /**
  17648. *
  17649. Returns the table's CAPTION, or void if none exists.
  17650. The value of attribute caption of the table element is read and checked against the expected value.
  17651. * @author Netscape
  17652. * @author Sivakiran Tummala
  17653. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520
  17654. */
  17655. table01: function(test) {
  17656. var success;
  17657. var nodeList;
  17658. var testNode;
  17659. var vcaption;
  17660. var doc;
  17661. var docRef = null;
  17662. if (typeof(this.doc) != 'undefined') {
  17663. docRef = this.doc;
  17664. }
  17665. doc = load("table1");
  17666. nodeList = doc.getElementsByTagName("table");
  17667. test.equal(nodeList.length, 1, 'Asize');
  17668. testNode = nodeList.item(0);
  17669. vcaption = testNode.caption;
  17670. test.equal(vcaption, null, 'vcaption should be null');
  17671. test.done();
  17672. },
  17673. /**
  17674. *
  17675. Caption alignment with respect to the table.
  17676. The value of attribute align of the tablecaption element is read and checked against the expected value.
  17677. * @author Netscape
  17678. * @author Sivakiran Tummala
  17679. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520
  17680. */
  17681. table02: function(test) {
  17682. var success;
  17683. var nodeList;
  17684. var testNode;
  17685. var vcaption;
  17686. var valign;
  17687. var doc;
  17688. var docRef = null;
  17689. if (typeof(this.doc) != 'undefined') {
  17690. docRef = this.doc;
  17691. }
  17692. doc = load("tablesection");
  17693. nodeList = doc.getElementsByTagName("table");
  17694. test.equal(nodeList.length, 2, 'Asize');
  17695. testNode = nodeList.item(1);
  17696. vcaption = testNode.caption;
  17697. valign = vcaption.align;
  17698. test.equal(valign, "top", "alignLink");
  17699. test.done();
  17700. },
  17701. /**
  17702. *
  17703. Alignment character for cells in a column.
  17704. The value of attribute ch of the tablesection element is read and checked against the expected value.
  17705. * @author Netscape
  17706. * @author Sivakiran Tummala
  17707. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
  17708. */
  17709. table03: function(test) {
  17710. var success;
  17711. var nodeList;
  17712. var testNode;
  17713. var vsection;
  17714. var vch;
  17715. var doc;
  17716. var docRef = null;
  17717. if (typeof(this.doc) != 'undefined') {
  17718. docRef = this.doc;
  17719. }
  17720. doc = load("tablesection");
  17721. nodeList = doc.getElementsByTagName("table");
  17722. test.equal(nodeList.length, 2, 'Asize');
  17723. testNode = nodeList.item(1);
  17724. vsection = testNode.tHead;
  17725. vch = vsection.ch;
  17726. test.equal(vch, "*", "chLink");
  17727. test.done();
  17728. },
  17729. /**
  17730. *
  17731. Horizontal alignment of data in cells.
  17732. The value of attribute align of the tablesection element is read and checked against the expected value.
  17733. * @author Netscape
  17734. * @author Sivakiran Tummala
  17735. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
  17736. */
  17737. table04: function(test) {
  17738. var success;
  17739. var nodeList;
  17740. var testNode;
  17741. var vsection;
  17742. var valign;
  17743. var doc;
  17744. var docRef = null;
  17745. if (typeof(this.doc) != 'undefined') {
  17746. docRef = this.doc;
  17747. }
  17748. doc = load("tablesection");
  17749. nodeList = doc.getElementsByTagName("table");
  17750. test.equal(nodeList.length, 2, 'Asize');
  17751. testNode = nodeList.item(1);
  17752. vsection = testNode.tHead;
  17753. valign = vsection.align;
  17754. test.equal(valign, "center", "alignLink");
  17755. test.done();
  17756. },
  17757. /**
  17758. *
  17759. Vertical alignment of data in cells.
  17760. The value of attribute valign of the tablesection element is read and checked against the expected value.
  17761. * @author Netscape
  17762. * @author Sivakiran Tummala
  17763. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
  17764. */
  17765. table06: function(test) {
  17766. var success;
  17767. var nodeList;
  17768. var testNode;
  17769. var vsection;
  17770. var vvAlign;
  17771. var doc;
  17772. var docRef = null;
  17773. if (typeof(this.doc) != 'undefined') {
  17774. docRef = this.doc;
  17775. }
  17776. doc = load("tablesection");
  17777. nodeList = doc.getElementsByTagName("table");
  17778. test.equal(nodeList.length, 2, 'Asize');
  17779. testNode = nodeList.item(1);
  17780. vsection = testNode.tFoot;
  17781. vvAlign = vsection.vAlign;
  17782. test.equal(vvAlign, "middle", "vAlignLink");
  17783. test.done();
  17784. },
  17785. /**
  17786. *
  17787. The collection of rows in this table section.
  17788. The value of attribute rows of the tablesection element is read and checked against the expected value.
  17789. * @author Netscape
  17790. * @author Sivakiran Tummala
  17791. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
  17792. */
  17793. table07: function(test) {
  17794. var success;
  17795. var nodeList;
  17796. var testNode;
  17797. var vsection;
  17798. var vcollection;
  17799. var vrows;
  17800. var doc;
  17801. var docRef = null;
  17802. if (typeof(this.doc) != 'undefined') {
  17803. docRef = this.doc;
  17804. }
  17805. doc = load("tablesection");
  17806. nodeList = doc.getElementsByTagName("table");
  17807. test.equal(nodeList.length, 2, 'Asize');
  17808. testNode = nodeList.item(1);
  17809. vsection = testNode.tFoot;
  17810. vcollection = vsection.rows;
  17811. vrows = vcollection.length;
  17812. test.equal(vrows, 1, "vrowsLink");
  17813. test.done();
  17814. },
  17815. /**
  17816. *
  17817. Horizontal alignment of data in cells.
  17818. The value of attribute align of the tablesection element is read and checked against the expected value.
  17819. * @author Netscape
  17820. * @author Sivakiran Tummala
  17821. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
  17822. */
  17823. table08: function(test) {
  17824. var success;
  17825. var nodeList;
  17826. var testNode;
  17827. var vsection;
  17828. var valign;
  17829. var doc;
  17830. var docRef = null;
  17831. if (typeof(this.doc) != 'undefined') {
  17832. docRef = this.doc;
  17833. }
  17834. doc = load("tablesection");
  17835. nodeList = doc.getElementsByTagName("table");
  17836. test.equal(nodeList.length, 2, 'Asize');
  17837. testNode = nodeList.item(1);
  17838. vsection = testNode.tFoot;
  17839. valign = vsection.align;
  17840. test.equal(valign, "center", "alignLink");
  17841. test.done();
  17842. },
  17843. /**
  17844. *
  17845. Vertical alignment of data in cells.
  17846. The value of attribute valign of the table element is read and checked against the expected value.
  17847. * @author Netscape
  17848. * @author Sivakiran Tummala
  17849. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
  17850. */
  17851. table09: function(test) {
  17852. var success;
  17853. var nodeList;
  17854. var testNode;
  17855. var vsection;
  17856. var vvalign;
  17857. var doc;
  17858. var docRef = null;
  17859. if (typeof(this.doc) != 'undefined') {
  17860. docRef = this.doc;
  17861. }
  17862. doc = load("tablesection");
  17863. nodeList = doc.getElementsByTagName("table");
  17864. test.equal(nodeList.length, 2, 'Asize');
  17865. testNode = nodeList.item(1);
  17866. vsection = testNode.tHead;
  17867. vvalign = vsection.vAlign;
  17868. test.equal(vvalign, "middle", "alignLink");
  17869. test.done();
  17870. },
  17871. /**
  17872. *
  17873. Alignment character for cells in a column.
  17874. The value of attribute ch of the tablesection element is read and checked against the expected value.
  17875. * @author Netscape
  17876. * @author Sivakiran Tummala
  17877. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
  17878. */
  17879. table10: function(test) {
  17880. var success;
  17881. var nodeList;
  17882. var testNode;
  17883. var vsection;
  17884. var vch;
  17885. var doc;
  17886. var docRef = null;
  17887. if (typeof(this.doc) != 'undefined') {
  17888. docRef = this.doc;
  17889. }
  17890. doc = load("tablesection");
  17891. nodeList = doc.getElementsByTagName("table");
  17892. test.equal(nodeList.length, 2, 'Asize');
  17893. testNode = nodeList.item(1);
  17894. vsection = testNode.tFoot;
  17895. vch = vsection.ch;
  17896. test.equal(vch, "+", "chLink");
  17897. test.done();
  17898. },
  17899. /**
  17900. *
  17901. Offset of alignment character.
  17902. The value of attribute choff of the tablesection element is read and checked against the expected value.
  17903. * @author Netscape
  17904. * @author Sivakiran Tummala
  17905. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
  17906. */
  17907. table12: function(test) {
  17908. var success;
  17909. var nodeList;
  17910. var testNode;
  17911. var vsection;
  17912. var vchoff;
  17913. var doc;
  17914. var docRef = null;
  17915. if (typeof(this.doc) != 'undefined') {
  17916. docRef = this.doc;
  17917. }
  17918. doc = load("tablesection");
  17919. nodeList = doc.getElementsByTagName("table");
  17920. test.equal(nodeList.length, 2, 'Asize');
  17921. testNode = nodeList.item(1);
  17922. vsection = testNode.tHead;
  17923. vchoff = vsection.chOff;
  17924. test.equal(vchoff, "1", "choffLink");
  17925. test.done();
  17926. },
  17927. /**
  17928. *
  17929. The collection of rows in this table section.
  17930. The value of attribute rows of the tablesection element is read and checked against the expected value.
  17931. * @author Netscape
  17932. * @author Sivakiran Tummala
  17933. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
  17934. */
  17935. table15: function(test) {
  17936. var success;
  17937. var nodeList;
  17938. var testNode;
  17939. var vsection;
  17940. var vcollection;
  17941. var vrows;
  17942. var doc;
  17943. var docRef = null;
  17944. if (typeof(this.doc) != 'undefined') {
  17945. docRef = this.doc;
  17946. }
  17947. doc = load("tablesection");
  17948. nodeList = doc.getElementsByTagName("table");
  17949. test.equal(nodeList.length, 2, 'Asize');
  17950. testNode = nodeList.item(1);
  17951. vsection = testNode.tHead;
  17952. vcollection = vsection.rows;
  17953. vrows = vcollection.length;
  17954. test.equal(vrows, 1, "vrowsLink");
  17955. test.done();
  17956. },
  17957. /**
  17958. *
  17959. Offset of alignment character.
  17960. The value of attribute chOff of the tablesection element is read and checked against the expected value.
  17961. * @author Netscape
  17962. * @author Sivakiran Tummala
  17963. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
  17964. */
  17965. table17: function(test) {
  17966. var success;
  17967. var nodeList;
  17968. var testNode;
  17969. var vsection;
  17970. var vchoff;
  17971. var doc;
  17972. var docRef = null;
  17973. if (typeof(this.doc) != 'undefined') {
  17974. docRef = this.doc;
  17975. }
  17976. doc = load("tablesection");
  17977. nodeList = doc.getElementsByTagName("table");
  17978. test.equal(nodeList.length, 2, 'Asize');
  17979. testNode = nodeList.item(1);
  17980. vsection = testNode.tFoot;
  17981. vchoff = vsection.chOff;
  17982. test.equal(vchoff, "2", "choffLink");
  17983. test.done();
  17984. },
  17985. /**
  17986. *
  17987. The index of this cell in the row.
  17988. The value of attribute cellIndex of the tablecell element is read and checked against the expected value.
  17989. * @author Netscape
  17990. * @author Sivakiran Tummala
  17991. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363
  17992. */
  17993. table18: function(test) {
  17994. var success;
  17995. var nodeList;
  17996. var testNode;
  17997. var vcindex;
  17998. var doc;
  17999. var docRef = null;
  18000. if (typeof(this.doc) != 'undefined') {
  18001. docRef = this.doc;
  18002. }
  18003. doc = load("tablecell");
  18004. nodeList = doc.getElementsByTagName("td");
  18005. test.equal(nodeList.length, 4, 'Asize');
  18006. testNode = nodeList.item(1);
  18007. vcindex = testNode.cellIndex;
  18008. test.equal(vcindex, 1, "cellIndexLink");
  18009. test.done();
  18010. },
  18011. /**
  18012. *
  18013. Abbreviation for header cells.
  18014. The index of this cell in the row.
  18015. The value of attribute abbr of the tablecell element is read and checked against the expected value.
  18016. * @author Netscape
  18017. * @author Sivakiran Tummala
  18018. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037
  18019. */
  18020. table19: function(test) {
  18021. var success;
  18022. var nodeList;
  18023. var testNode;
  18024. var vabbr;
  18025. var doc;
  18026. var docRef = null;
  18027. if (typeof(this.doc) != 'undefined') {
  18028. docRef = this.doc;
  18029. }
  18030. doc = load("tablecell");
  18031. nodeList = doc.getElementsByTagName("td");
  18032. test.equal(nodeList.length, 4, 'Asize');
  18033. testNode = nodeList.item(1);
  18034. vabbr = testNode.abbr;
  18035. test.equal(vabbr, "hd2", "abbrLink");
  18036. test.done();
  18037. },
  18038. /**
  18039. *
  18040. Names group of related headers.
  18041. The value of attribute axis of the tablecell element is read and checked against the expected value.
  18042. * @author Netscape
  18043. * @author Sivakiran Tummala
  18044. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418
  18045. */
  18046. table20: function(test) {
  18047. var success;
  18048. var nodeList;
  18049. var testNode;
  18050. var vaxis;
  18051. var doc;
  18052. var docRef = null;
  18053. if (typeof(this.doc) != 'undefined') {
  18054. docRef = this.doc;
  18055. }
  18056. doc = load("tablecell");
  18057. nodeList = doc.getElementsByTagName("td");
  18058. test.equal(nodeList.length, 4, 'Asize');
  18059. testNode = nodeList.item(1);
  18060. vaxis = testNode.axis;
  18061. test.equal(vaxis, "center", "axisLink");
  18062. test.done();
  18063. },
  18064. /**
  18065. *
  18066. Horizontal alignment of data in cell.
  18067. The value of attribute align of the tablecell element is read and checked against the expected value.
  18068. * @author Netscape
  18069. * @author Sivakiran Tummala
  18070. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879
  18071. */
  18072. table21: function(test) {
  18073. var success;
  18074. var nodeList;
  18075. var testNode;
  18076. var valign;
  18077. var doc;
  18078. var docRef = null;
  18079. if (typeof(this.doc) != 'undefined') {
  18080. docRef = this.doc;
  18081. }
  18082. doc = load("tablecell");
  18083. nodeList = doc.getElementsByTagName("td");
  18084. test.equal(nodeList.length, 4, 'Asize');
  18085. testNode = nodeList.item(1);
  18086. valign = testNode.align;
  18087. test.equal(valign, "center", "alignLink");
  18088. test.done();
  18089. },
  18090. /**
  18091. *
  18092. Cell background color.
  18093. The value of attribute bgColor of the tablecell element is read and checked against the expected value.
  18094. * @author Netscape
  18095. * @author Sivakiran Tummala
  18096. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431
  18097. */
  18098. table22: function(test) {
  18099. var success;
  18100. var nodeList;
  18101. var testNode;
  18102. var vbgcolor;
  18103. var doc;
  18104. var docRef = null;
  18105. if (typeof(this.doc) != 'undefined') {
  18106. docRef = this.doc;
  18107. }
  18108. doc = load("tablecell");
  18109. nodeList = doc.getElementsByTagName("td");
  18110. test.equal(nodeList.length, 4, 'Asize');
  18111. testNode = nodeList.item(1);
  18112. vbgcolor = testNode.bgColor;
  18113. test.equal(vbgcolor.toLowerCase(), "#FF0000".toLowerCase(), "bgcolorLink");
  18114. test.done();
  18115. },
  18116. /**
  18117. *
  18118. Alignment character for cells in a column.
  18119. The value of attribute char of the tablecell element is read and checked against the expected value.
  18120. * @author Netscape
  18121. * @author Sivakiran Tummala
  18122. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780
  18123. */
  18124. table23: function(test) {
  18125. var success;
  18126. var nodeList;
  18127. var testNode;
  18128. var vch;
  18129. var doc;
  18130. var docRef = null;
  18131. if (typeof(this.doc) != 'undefined') {
  18132. docRef = this.doc;
  18133. }
  18134. doc = load("tablecell");
  18135. nodeList = doc.getElementsByTagName("td");
  18136. test.equal(nodeList.length, 4, 'Asize');
  18137. testNode = nodeList.item(1);
  18138. vch = testNode.ch;
  18139. test.equal(vch, ":", "chLink");
  18140. test.done();
  18141. },
  18142. /**
  18143. *
  18144. offset of alignment character.
  18145. The value of attribute chOff of the tablecell element is read and checked against the expected value.
  18146. * @author Netscape
  18147. * @author Sivakiran Tummala
  18148. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310
  18149. */
  18150. table24: function(test) {
  18151. var success;
  18152. var nodeList;
  18153. var testNode;
  18154. var vchoff;
  18155. var doc;
  18156. var docRef = null;
  18157. if (typeof(this.doc) != 'undefined') {
  18158. docRef = this.doc;
  18159. }
  18160. doc = load("tablecell");
  18161. nodeList = doc.getElementsByTagName("td");
  18162. test.equal(nodeList.length, 4, 'Asize');
  18163. testNode = nodeList.item(1);
  18164. vchoff = testNode.chOff;
  18165. test.equal(vchoff, "1", "chOffLink");
  18166. test.done();
  18167. },
  18168. /**
  18169. *
  18170. Number of columns spanned by cell.
  18171. The value of attribute colspan of the tablecell element is read and checked against the expected value.
  18172. * @author Netscape
  18173. * @author Sivakiran Tummala
  18174. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244
  18175. */
  18176. table25: function(test) {
  18177. var success;
  18178. var nodeList;
  18179. var testNode;
  18180. var vcolspan;
  18181. var doc;
  18182. var docRef = null;
  18183. if (typeof(this.doc) != 'undefined') {
  18184. docRef = this.doc;
  18185. }
  18186. doc = load("tablecell");
  18187. nodeList = doc.getElementsByTagName("td");
  18188. test.equal(nodeList.length, 4, 'Asize');
  18189. testNode = nodeList.item(1);
  18190. vcolspan = testNode.colSpan;
  18191. test.equal(vcolspan, 1, "colSpanLink");
  18192. test.done();
  18193. },
  18194. /**
  18195. *
  18196. The value of attribute height of the tablecell element is read and checked against the expected value.
  18197. * @author Netscape
  18198. * @author Sivakiran Tummala
  18199. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212
  18200. */
  18201. table26: function(test) {
  18202. var success;
  18203. var nodeList;
  18204. var testNode;
  18205. var vheight;
  18206. var doc;
  18207. var docRef = null;
  18208. if (typeof(this.doc) != 'undefined') {
  18209. docRef = this.doc;
  18210. }
  18211. doc = load("tablecell");
  18212. nodeList = doc.getElementsByTagName("td");
  18213. test.equal(nodeList.length, 4, 'Asize');
  18214. testNode = nodeList.item(1);
  18215. vheight = testNode.height;
  18216. test.equal(vheight, "50", "heightLink");
  18217. test.done();
  18218. },
  18219. /**
  18220. *
  18221. Suppress word wrapping.
  18222. The value of attribute nowrap of the tablecell element is read and checked against the expected value.
  18223. * @author Netscape
  18224. * @author Sivakiran Tummala
  18225. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045
  18226. */
  18227. table27: function(test) {
  18228. var success;
  18229. var nodeList;
  18230. var testNode;
  18231. var vnowrap;
  18232. var doc;
  18233. var docRef = null;
  18234. if (typeof(this.doc) != 'undefined') {
  18235. docRef = this.doc;
  18236. }
  18237. doc = load("tablecell");
  18238. nodeList = doc.getElementsByTagName("td");
  18239. test.equal(nodeList.length, 4, 'Asize');
  18240. testNode = nodeList.item(1);
  18241. vnowrap = testNode.noWrap;
  18242. test.ok(vnowrap, 'nowrapLink');
  18243. test.done();
  18244. },
  18245. /**
  18246. *
  18247. Number of rows spanned by cell.
  18248. The value of attribute rowspan of the tablecell element is read and checked against the expected value.
  18249. * @author Netscape
  18250. * @author Sivakiran Tummala
  18251. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625
  18252. */
  18253. table28: function(test) {
  18254. var success;
  18255. var nodeList;
  18256. var testNode;
  18257. var vrowspan;
  18258. var doc;
  18259. var docRef = null;
  18260. if (typeof(this.doc) != 'undefined') {
  18261. docRef = this.doc;
  18262. }
  18263. doc = load("tablecell");
  18264. nodeList = doc.getElementsByTagName("td");
  18265. test.equal(nodeList.length, 4, 'Asize');
  18266. testNode = nodeList.item(1);
  18267. vrowspan = testNode.rowSpan;
  18268. test.equal(vrowspan, 1, "rowSpanLink");
  18269. test.done();
  18270. },
  18271. /**
  18272. *
  18273. Scope covered by header cells.
  18274. The value of attribute scope of the tablecell element is read and checked against the expected value.
  18275. * @author Netscape
  18276. * @author Sivakiran Tummala
  18277. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952
  18278. */
  18279. table29: function(test) {
  18280. var success;
  18281. var nodeList;
  18282. var testNode;
  18283. var vscope;
  18284. var doc;
  18285. var docRef = null;
  18286. if (typeof(this.doc) != 'undefined') {
  18287. docRef = this.doc;
  18288. }
  18289. doc = load("tablecell");
  18290. nodeList = doc.getElementsByTagName("td");
  18291. test.equal(nodeList.length, 4, 'Asize');
  18292. testNode = nodeList.item(1);
  18293. vscope = testNode.scope;
  18294. test.equal(vscope, "col", "scopeLink");
  18295. test.done();
  18296. },
  18297. /**
  18298. *
  18299. List of id attribute values for header cells.
  18300. The value of attribute headers of the tablecell element is read and checked against the expected value.
  18301. * @author Netscape
  18302. * @author Sivakiran Tummala
  18303. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817
  18304. */
  18305. table30: function(test) {
  18306. var success;
  18307. var nodeList;
  18308. var testNode;
  18309. var vheaders;
  18310. var doc;
  18311. var docRef = null;
  18312. if (typeof(this.doc) != 'undefined') {
  18313. docRef = this.doc;
  18314. }
  18315. doc = load("tablecell");
  18316. nodeList = doc.getElementsByTagName("td");
  18317. test.equal(nodeList.length, 4, 'Asize');
  18318. testNode = nodeList.item(1);
  18319. vheaders = testNode.headers;
  18320. test.equal(vheaders, "header-3", "headersLink");
  18321. test.done();
  18322. },
  18323. /**
  18324. *
  18325. Vertical alignment of data in cell.
  18326. The value of attribute valign of the tablecell element is read and checked against the expected value.
  18327. * @author Netscape
  18328. * @author Sivakiran Tummala
  18329. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221
  18330. */
  18331. table31: function(test) {
  18332. var success;
  18333. var nodeList;
  18334. var testNode;
  18335. var vvalign;
  18336. var doc;
  18337. var docRef = null;
  18338. if (typeof(this.doc) != 'undefined') {
  18339. docRef = this.doc;
  18340. }
  18341. doc = load("tablecell");
  18342. nodeList = doc.getElementsByTagName("td");
  18343. test.equal(nodeList.length, 4, 'Asize');
  18344. testNode = nodeList.item(1);
  18345. vvalign = testNode.vAlign;
  18346. test.equal(vvalign, "middle", "vAlignLink");
  18347. test.done();
  18348. },
  18349. /**
  18350. *
  18351. cell width.
  18352. The value of attribute width of the table element is read and checked against the expected value.
  18353. * @author Netscape
  18354. * @author Sivakiran Tummala
  18355. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795
  18356. */
  18357. table32: function(test) {
  18358. var success;
  18359. var nodeList;
  18360. var testNode;
  18361. var vwidth;
  18362. var doc;
  18363. var docRef = null;
  18364. if (typeof(this.doc) != 'undefined') {
  18365. docRef = this.doc;
  18366. }
  18367. doc = load("tablecell");
  18368. nodeList = doc.getElementsByTagName("td");
  18369. test.equal(nodeList.length, 4, 'Asize');
  18370. testNode = nodeList.item(1);
  18371. vwidth = testNode.width;
  18372. test.equal(vwidth, "175", "vwidthLink");
  18373. test.done();
  18374. },
  18375. /**
  18376. *
  18377. Specifies the table's position with respect to the rest of the document.
  18378. The value of attribute align of the table element is read and checked against the expected value.
  18379. * @author Netscape
  18380. * @author Sivakiran Tummala
  18381. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23180977
  18382. */
  18383. table33: function(test) {
  18384. var success;
  18385. var nodeList;
  18386. var testNode;
  18387. var valign;
  18388. var doc;
  18389. var docRef = null;
  18390. if (typeof(this.doc) != 'undefined') {
  18391. docRef = this.doc;
  18392. }
  18393. doc = load("table");
  18394. nodeList = doc.getElementsByTagName("table");
  18395. test.equal(nodeList.length, 3, 'Asize');
  18396. testNode = nodeList.item(1);
  18397. valign = testNode.align;
  18398. test.equal(valign, "center", "alignLink");
  18399. test.done();
  18400. },
  18401. /**
  18402. *
  18403. The width of the border around the table.
  18404. The value of attribute border of the table element is read and checked against the expected value.
  18405. * @author Netscape
  18406. * @author Sivakiran Tummala
  18407. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50969400
  18408. */
  18409. table34: function(test) {
  18410. var success;
  18411. var nodeList;
  18412. var testNode;
  18413. var vborder;
  18414. var doc;
  18415. var docRef = null;
  18416. if (typeof(this.doc) != 'undefined') {
  18417. docRef = this.doc;
  18418. }
  18419. doc = load("table");
  18420. nodeList = doc.getElementsByTagName("table");
  18421. test.equal(nodeList.length, 3, 'Asize');
  18422. testNode = nodeList.item(1);
  18423. vborder = testNode.border;
  18424. test.equal(vborder, "4", "borderLink");
  18425. test.done();
  18426. },
  18427. /**
  18428. *
  18429. Cell background color.
  18430. The value of attribute bgcolor of the table element is read and checked against the expected value.
  18431. * @author Netscape
  18432. * @author Sivakiran Tummala
  18433. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83532985
  18434. */
  18435. table35: function(test) {
  18436. var success;
  18437. var nodeList;
  18438. var testNode;
  18439. var vbgcolor;
  18440. var doc;
  18441. var docRef = null;
  18442. if (typeof(this.doc) != 'undefined') {
  18443. docRef = this.doc;
  18444. }
  18445. doc = load("table");
  18446. nodeList = doc.getElementsByTagName("table");
  18447. test.equal(nodeList.length, 3, 'Asize');
  18448. testNode = nodeList.item(1);
  18449. vbgcolor = testNode.bgColor;
  18450. test.equal(vbgcolor, "#ff0000", "bgcolorLink");
  18451. test.done();
  18452. },
  18453. /**
  18454. *
  18455. Specifies which external table borders to render.
  18456. The value of attribute frame of the table element is read and checked against the expected value.
  18457. * @author Netscape
  18458. * @author Sivakiran Tummala
  18459. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64808476
  18460. */
  18461. table36: function(test) {
  18462. var success;
  18463. var nodeList;
  18464. var testNode;
  18465. var vframe;
  18466. var doc;
  18467. var docRef = null;
  18468. if (typeof(this.doc) != 'undefined') {
  18469. docRef = this.doc;
  18470. }
  18471. doc = load("table");
  18472. nodeList = doc.getElementsByTagName("table");
  18473. test.equal(nodeList.length, 3, 'Asize');
  18474. testNode = nodeList.item(1);
  18475. vframe = testNode.frame;
  18476. test.equal(vframe, "border", "frameLink");
  18477. test.done();
  18478. },
  18479. /**
  18480. *
  18481. Specifies the horizontal and vertical space between cell content and cell borders. The value of attribute cellpadding of the table element is read and checked against the expected value.
  18482. * @author Netscape
  18483. * @author Sivakiran Tummala
  18484. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59162158
  18485. */
  18486. table37: function(test) {
  18487. var success;
  18488. var nodeList;
  18489. var testNode;
  18490. var vcellpadding;
  18491. var doc;
  18492. var docRef = null;
  18493. if (typeof(this.doc) != 'undefined') {
  18494. docRef = this.doc;
  18495. }
  18496. doc = load("table");
  18497. nodeList = doc.getElementsByTagName("table");
  18498. test.equal(nodeList.length, 3, 'Asize');
  18499. testNode = nodeList.item(1);
  18500. vcellpadding = testNode.cellPadding;
  18501. test.equal(vcellpadding, "2", "cellpaddingLink");
  18502. test.done();
  18503. },
  18504. /**
  18505. *
  18506. Specifies the horizontal and vertical separation between cells.
  18507. The value of attribute cellspacing of the table element is read and checked against the expected value.
  18508. * @author Netscape
  18509. * @author Sivakiran Tummala
  18510. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68907883
  18511. */
  18512. table38: function(test) {
  18513. var success;
  18514. var nodeList;
  18515. var testNode;
  18516. var vcellspacing;
  18517. var doc;
  18518. var docRef = null;
  18519. if (typeof(this.doc) != 'undefined') {
  18520. docRef = this.doc;
  18521. }
  18522. doc = load("table");
  18523. nodeList = doc.getElementsByTagName("table");
  18524. test.equal(nodeList.length, 3, 'Asize');
  18525. testNode = nodeList.item(1);
  18526. vcellspacing = testNode.cellSpacing;
  18527. test.equal(vcellspacing, "2", "cellspacingLink");
  18528. test.done();
  18529. },
  18530. /**
  18531. *
  18532. Supplementary description about the purpose or structure of a table.
  18533. The value of attribute summary of the table element is read and checked against the expected value.
  18534. * @author Netscape
  18535. * @author Sivakiran Tummala
  18536. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-44998528
  18537. */
  18538. table39: function(test) {
  18539. var success;
  18540. var nodeList;
  18541. var testNode;
  18542. var vsummary;
  18543. var doc;
  18544. var docRef = null;
  18545. if (typeof(this.doc) != 'undefined') {
  18546. docRef = this.doc;
  18547. }
  18548. doc = load("table");
  18549. nodeList = doc.getElementsByTagName("table");
  18550. test.equal(nodeList.length, 3, 'Asize');
  18551. testNode = nodeList.item(1);
  18552. vsummary = testNode.summary;
  18553. test.equal(vsummary, "HTML Control Table", "summaryLink");
  18554. test.done();
  18555. },
  18556. /**
  18557. *
  18558. Specifies which internal table borders to render.
  18559. The value of attribute rules of the table element is read and checked against the expected value.
  18560. * @author Netscape
  18561. * @author Sivakiran Tummala
  18562. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26347553
  18563. */
  18564. table40: function(test) {
  18565. var success;
  18566. var nodeList;
  18567. var testNode;
  18568. var vrules;
  18569. var doc;
  18570. var docRef = null;
  18571. if (typeof(this.doc) != 'undefined') {
  18572. docRef = this.doc;
  18573. }
  18574. doc = load("table");
  18575. nodeList = doc.getElementsByTagName("table");
  18576. test.equal(nodeList.length, 3, 'Asize');
  18577. testNode = nodeList.item(1);
  18578. vrules = testNode.rules;
  18579. test.equal(vrules, "all", "rulesLink");
  18580. test.done();
  18581. },
  18582. /**
  18583. *
  18584. Specifies the desired table width.
  18585. The value of attribute width of the table element is read and checked against the expected value.
  18586. * @author Netscape
  18587. * @author Sivakiran Tummala
  18588. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77447361
  18589. */
  18590. table41: function(test) {
  18591. var success;
  18592. var nodeList;
  18593. var testNode;
  18594. var vwidth;
  18595. var doc;
  18596. var docRef = null;
  18597. if (typeof(this.doc) != 'undefined') {
  18598. docRef = this.doc;
  18599. }
  18600. doc = load("table");
  18601. nodeList = doc.getElementsByTagName("table");
  18602. test.equal(nodeList.length, 3, 'Asize');
  18603. testNode = nodeList.item(1);
  18604. vwidth = testNode.width;
  18605. test.equal(vwidth, "680", "widthLink");
  18606. test.done();
  18607. },
  18608. /**
  18609. *
  18610. Horizontal alignment of data within cells of this row.
  18611. The value of attribute align of the tablerow element is read and checked against the expected value.
  18612. * @author Netscape
  18613. * @author Sivakiran Tummala
  18614. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257
  18615. */
  18616. table42: function(test) {
  18617. var success;
  18618. var nodeList;
  18619. var testNode;
  18620. var valign;
  18621. var doc;
  18622. var docRef = null;
  18623. if (typeof(this.doc) != 'undefined') {
  18624. docRef = this.doc;
  18625. }
  18626. doc = load("table");
  18627. nodeList = doc.getElementsByTagName("tr");
  18628. test.equal(nodeList.length, 8, 'Asize');
  18629. testNode = nodeList.item(1);
  18630. valign = testNode.align;
  18631. test.equal(valign, "center", "alignLink");
  18632. test.done();
  18633. },
  18634. /**
  18635. *
  18636. Background color for rows.
  18637. The value of attribute bgcolor of the tablerow element is read and checked against the expected value.
  18638. * @author Netscape
  18639. * @author Sivakiran Tummala
  18640. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18161327
  18641. */
  18642. table43: function(test) {
  18643. var success;
  18644. var nodeList;
  18645. var testNode;
  18646. var vbgcolor;
  18647. var doc;
  18648. var docRef = null;
  18649. if (typeof(this.doc) != 'undefined') {
  18650. docRef = this.doc;
  18651. }
  18652. doc = load("table");
  18653. nodeList = doc.getElementsByTagName("tr");
  18654. test.equal(nodeList.length, 8, 'Asize');
  18655. testNode = nodeList.item(1);
  18656. vbgcolor = testNode.bgColor;
  18657. test.equal(vbgcolor.toLowerCase(), "#00FFFF".toLowerCase(), "bgcolorLink");
  18658. test.done();
  18659. },
  18660. /**
  18661. *
  18662. Vertical alignment of data within cells of this row.
  18663. The value of attribute valign of the tablerow element is read and checked against the expected value.
  18664. * @author Netscape
  18665. * @author Sivakiran Tummala
  18666. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90000058
  18667. */
  18668. table44: function(test) {
  18669. var success;
  18670. var nodeList;
  18671. var testNode;
  18672. var vvalign;
  18673. var doc;
  18674. var docRef = null;
  18675. if (typeof(this.doc) != 'undefined') {
  18676. docRef = this.doc;
  18677. }
  18678. doc = load("table");
  18679. nodeList = doc.getElementsByTagName("tr");
  18680. test.equal(nodeList.length, 8, 'Asize');
  18681. testNode = nodeList.item(1);
  18682. vvalign = testNode.vAlign;
  18683. test.equal(vvalign, "middle", "valignLink");
  18684. test.done();
  18685. },
  18686. /**
  18687. *
  18688. Alignment character for cells in a column.
  18689. The value of attribute ch of the tablerow element is read and checked against the expected value.
  18690. * @author Netscape
  18691. * @author Sivakiran Tummala
  18692. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502
  18693. */
  18694. table45: function(test) {
  18695. var success;
  18696. var nodeList;
  18697. var testNode;
  18698. var vch;
  18699. var doc;
  18700. var docRef = null;
  18701. if (typeof(this.doc) != 'undefined') {
  18702. docRef = this.doc;
  18703. }
  18704. doc = load("tablerow");
  18705. nodeList = doc.getElementsByTagName("tr");
  18706. test.equal(nodeList.length, 5, 'Asize');
  18707. testNode = nodeList.item(1);
  18708. vch = testNode.ch;
  18709. test.equal(vch, "*", "vchLink");
  18710. test.done();
  18711. },
  18712. /**
  18713. *
  18714. Offset of alignment character.
  18715. The value of attribute choff of the tablerow element is read and checked against the expected value.
  18716. * @author Netscape
  18717. * @author Sivakiran Tummala
  18718. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461
  18719. */
  18720. table46: function(test) {
  18721. var success;
  18722. var nodeList;
  18723. var testNode;
  18724. var vchoff;
  18725. var doc;
  18726. var docRef = null;
  18727. if (typeof(this.doc) != 'undefined') {
  18728. docRef = this.doc;
  18729. }
  18730. doc = load("tablerow");
  18731. nodeList = doc.getElementsByTagName("tr");
  18732. test.equal(nodeList.length, 5, 'Asize');
  18733. testNode = nodeList.item(1);
  18734. vchoff = testNode.chOff;
  18735. test.equal(vchoff, "1", "choffLink");
  18736. test.done();
  18737. },
  18738. /**
  18739. *
  18740. The index of this row, relative to the entire table.
  18741. The value of attribute rowIndex of the table element is read and checked against the expected value.
  18742. * @author Netscape
  18743. * @author Sivakiran Tummala
  18744. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67347567
  18745. */
  18746. table47: function(test) {
  18747. var success;
  18748. var nodeList;
  18749. var testNode;
  18750. var vrindex;
  18751. var doc;
  18752. var docRef = null;
  18753. if (typeof(this.doc) != 'undefined') {
  18754. docRef = this.doc;
  18755. }
  18756. doc = load("tablerow");
  18757. nodeList = doc.getElementsByTagName("tr");
  18758. test.equal(nodeList.length, 5, 'Asize');
  18759. testNode = nodeList.item(4);
  18760. vrindex = testNode.rowIndex;
  18761. test.equal(vrindex, 2, "rowIndexLink");
  18762. test.done();
  18763. },
  18764. /**
  18765. *
  18766. Horizontal alignment of cell data in column.
  18767. The value of attribute align of the tablecol element is read and checked against the expected value.
  18768. * @author Netscape
  18769. * @author Sivakiran Tummala
  18770. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257
  18771. */
  18772. table48: function(test) {
  18773. var success;
  18774. var nodeList;
  18775. var testNode;
  18776. var valign;
  18777. var doc;
  18778. var docRef = null;
  18779. if (typeof(this.doc) != 'undefined') {
  18780. docRef = this.doc;
  18781. }
  18782. doc = load("tablecol");
  18783. nodeList = doc.getElementsByTagName("col");
  18784. test.equal(nodeList.length, 1, 'Asize');
  18785. testNode = nodeList.item(0);
  18786. valign = testNode.align;
  18787. test.equal(valign, "center", "alignLink");
  18788. test.done();
  18789. },
  18790. /**
  18791. *
  18792. Alignment character for cells in a column.
  18793. The value of attribute ch of the tablecol element is read and checked against the expected value.
  18794. * @author Netscape
  18795. * @author Sivakiran Tummala
  18796. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502
  18797. */
  18798. table49: function(test) {
  18799. var success;
  18800. var nodeList;
  18801. var testNode;
  18802. var vch;
  18803. var doc;
  18804. var docRef = null;
  18805. if (typeof(this.doc) != 'undefined') {
  18806. docRef = this.doc;
  18807. }
  18808. doc = load("tablecol");
  18809. nodeList = doc.getElementsByTagName("col");
  18810. test.equal(nodeList.length, 1, 'Asize');
  18811. testNode = nodeList.item(0);
  18812. vch = testNode.ch;
  18813. test.equal(vch, "*", "chLink");
  18814. test.done();
  18815. },
  18816. /**
  18817. *
  18818. Offset of alignment character.
  18819. The value of attribute choff of the tablecol element is read and checked against the expected value.
  18820. * @author Netscape
  18821. * @author Sivakiran Tummala
  18822. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461
  18823. */
  18824. table50: function(test) {
  18825. var success;
  18826. var nodeList;
  18827. var testNode;
  18828. var vchoff;
  18829. var doc;
  18830. var docRef = null;
  18831. if (typeof(this.doc) != 'undefined') {
  18832. docRef = this.doc;
  18833. }
  18834. doc = load("tablecol");
  18835. nodeList = doc.getElementsByTagName("col");
  18836. test.equal(nodeList.length, 1, 'Asize');
  18837. testNode = nodeList.item(0);
  18838. vchoff = testNode.chOff;
  18839. test.equal(vchoff, "20", "chOffLink");
  18840. test.done();
  18841. },
  18842. /**
  18843. *
  18844. Indicates the number of columns in a group or affected by a grouping.
  18845. The value of attribute span of the tablecol element is read and checked against the expected value.
  18846. * @author Netscape
  18847. * @author Sivakiran Tummala
  18848. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335
  18849. */
  18850. table51: function(test) {
  18851. var success;
  18852. var nodeList;
  18853. var testNode;
  18854. var vspan;
  18855. var doc;
  18856. var docRef = null;
  18857. if (typeof(this.doc) != 'undefined') {
  18858. docRef = this.doc;
  18859. }
  18860. doc = load("tablecol");
  18861. nodeList = doc.getElementsByTagName("col");
  18862. test.equal(nodeList.length, 1, 'Asize');
  18863. testNode = nodeList.item(0);
  18864. vspan = testNode.span;
  18865. test.equal(vspan, 1, "spanLink");
  18866. test.done();
  18867. },
  18868. /**
  18869. *
  18870. Vertical alignment of cell data in column.
  18871. The value of attribute valign of the tablecol element is read and checked against the expected value.
  18872. * @author Netscape
  18873. * @author Sivakiran Tummala
  18874. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710
  18875. */
  18876. table52: function(test) {
  18877. var success;
  18878. var nodeList;
  18879. var testNode;
  18880. var vvalign;
  18881. var doc;
  18882. var docRef = null;
  18883. if (typeof(this.doc) != 'undefined') {
  18884. docRef = this.doc;
  18885. }
  18886. doc = load("tablecol");
  18887. nodeList = doc.getElementsByTagName("col");
  18888. test.equal(nodeList.length, 1, 'Asize');
  18889. testNode = nodeList.item(0);
  18890. vvalign = testNode.vAlign;
  18891. test.equal(vvalign, "middle", "vAlignLink");
  18892. test.done();
  18893. },
  18894. /**
  18895. *
  18896. Default column width.
  18897. The value of attribute width of the tablecol element is read and checked against the expected value.
  18898. * @author Netscape
  18899. * @author Sivakiran Tummala
  18900. * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799
  18901. */
  18902. table53: function(test) {
  18903. var success;
  18904. var nodeList;
  18905. var testNode;
  18906. var vwidth;
  18907. var doc;
  18908. var docRef = null;
  18909. if (typeof(this.doc) != 'undefined') {
  18910. docRef = this.doc;
  18911. }
  18912. doc = load("tablecol");
  18913. nodeList = doc.getElementsByTagName("col");
  18914. test.equal(nodeList.length, 1, 'Asize');
  18915. testNode = nodeList.item(0);
  18916. vwidth = testNode.width;
  18917. test.equal(vwidth, "20", "widthLink");
  18918. test.done();
  18919. },
  18920. document_write_before_loaded: function(test) {
  18921. var anchor, doc, docRef = null;
  18922. if (typeof(this.doc) != 'undefined') {
  18923. docRef = this.doc;
  18924. }
  18925. doc = load("anchor");
  18926. doc.innerHTML = "<html><body><p><a id='Anchor'>Anchor Text</a></body></html>";
  18927. anchor = doc.getElementById("Anchor");
  18928. doc.readyState = 'loading';
  18929. doc.write("hello world");
  18930. test.equal(anchor.innerHTML, 'hello world', "#Anchor's innerHTML should be set");
  18931. test.done();
  18932. },
  18933. event_default_action: function(test) {
  18934. var success;
  18935. var doc;
  18936. var target;
  18937. var evt;
  18938. var preventDefault;
  18939. var performedDefault = false;
  18940. var docRef = null;
  18941. if (typeof(this.doc) != 'undefined') {
  18942. docRef = this.doc;
  18943. }
  18944. doc = load("anchor");
  18945. var a = doc.getElementById("Anchor");
  18946. a.addEventListener("foo", function() {}, true);
  18947. evt = doc.createEvent("Events");
  18948. evt.initEvent("foo",false,false);
  18949. a._eventDefaults['foo'] = function(event) {
  18950. performedDefault = true;
  18951. }
  18952. preventDefault = a.dispatchEvent(evt);
  18953. test.equal(preventDefault, false, 'preventDefault should be *false*');
  18954. test.ok(performedDefault, 'performedDefault');
  18955. test.done();
  18956. }
  18957. }