urltestdata.json 179 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214
  1. [
  2. "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js",
  3. "# AS OF https://github.com/web-platform-tests/wpt/commit/53a00b35ce2808bbbef9699ac4b6f0d5da46009a",
  4. {
  5. "input": "http://example\t.\norg",
  6. "base": "http://example.org/foo/bar",
  7. "href": "http://example.org/",
  8. "origin": "http://example.org",
  9. "protocol": "http:",
  10. "username": "",
  11. "password": "",
  12. "host": "example.org",
  13. "hostname": "example.org",
  14. "port": "",
  15. "pathname": "/",
  16. "search": "",
  17. "hash": ""
  18. },
  19. {
  20. "input": "http://user:pass@foo:21/bar;par?b#c",
  21. "base": "http://example.org/foo/bar",
  22. "href": "http://user:pass@foo:21/bar;par?b#c",
  23. "origin": "http://foo:21",
  24. "protocol": "http:",
  25. "username": "user",
  26. "password": "pass",
  27. "host": "foo:21",
  28. "hostname": "foo",
  29. "port": "21",
  30. "pathname": "/bar;par",
  31. "search": "?b",
  32. "hash": "#c"
  33. },
  34. {
  35. "input": "https://test:@test",
  36. "base": "about:blank",
  37. "href": "https://test@test/",
  38. "origin": "https://test",
  39. "protocol": "https:",
  40. "username": "test",
  41. "password": "",
  42. "host": "test",
  43. "hostname": "test",
  44. "port": "",
  45. "pathname": "/",
  46. "search": "",
  47. "hash": ""
  48. },
  49. {
  50. "input": "https://:@test",
  51. "base": "about:blank",
  52. "href": "https://test/",
  53. "origin": "https://test",
  54. "protocol": "https:",
  55. "username": "",
  56. "password": "",
  57. "host": "test",
  58. "hostname": "test",
  59. "port": "",
  60. "pathname": "/",
  61. "search": "",
  62. "hash": ""
  63. },
  64. {
  65. "input": "non-special://test:@test/x",
  66. "base": "about:blank",
  67. "href": "non-special://test@test/x",
  68. "origin": "null",
  69. "protocol": "non-special:",
  70. "username": "test",
  71. "password": "",
  72. "host": "test",
  73. "hostname": "test",
  74. "port": "",
  75. "pathname": "/x",
  76. "search": "",
  77. "hash": ""
  78. },
  79. {
  80. "input": "non-special://:@test/x",
  81. "base": "about:blank",
  82. "href": "non-special://test/x",
  83. "origin": "null",
  84. "protocol": "non-special:",
  85. "username": "",
  86. "password": "",
  87. "host": "test",
  88. "hostname": "test",
  89. "port": "",
  90. "pathname": "/x",
  91. "search": "",
  92. "hash": ""
  93. },
  94. {
  95. "input": "http:foo.com",
  96. "base": "http://example.org/foo/bar",
  97. "href": "http://example.org/foo/foo.com",
  98. "origin": "http://example.org",
  99. "protocol": "http:",
  100. "username": "",
  101. "password": "",
  102. "host": "example.org",
  103. "hostname": "example.org",
  104. "port": "",
  105. "pathname": "/foo/foo.com",
  106. "search": "",
  107. "hash": ""
  108. },
  109. {
  110. "input": "\t :foo.com \n",
  111. "base": "http://example.org/foo/bar",
  112. "href": "http://example.org/foo/:foo.com",
  113. "origin": "http://example.org",
  114. "protocol": "http:",
  115. "username": "",
  116. "password": "",
  117. "host": "example.org",
  118. "hostname": "example.org",
  119. "port": "",
  120. "pathname": "/foo/:foo.com",
  121. "search": "",
  122. "hash": ""
  123. },
  124. {
  125. "input": " foo.com ",
  126. "base": "http://example.org/foo/bar",
  127. "href": "http://example.org/foo/foo.com",
  128. "origin": "http://example.org",
  129. "protocol": "http:",
  130. "username": "",
  131. "password": "",
  132. "host": "example.org",
  133. "hostname": "example.org",
  134. "port": "",
  135. "pathname": "/foo/foo.com",
  136. "search": "",
  137. "hash": ""
  138. },
  139. {
  140. "input": "a:\t foo.com",
  141. "base": "http://example.org/foo/bar",
  142. "href": "a: foo.com",
  143. "origin": "null",
  144. "protocol": "a:",
  145. "username": "",
  146. "password": "",
  147. "host": "",
  148. "hostname": "",
  149. "port": "",
  150. "pathname": " foo.com",
  151. "search": "",
  152. "hash": ""
  153. },
  154. {
  155. "input": "http://f:21/ b ? d # e ",
  156. "base": "http://example.org/foo/bar",
  157. "href": "http://f:21/%20b%20?%20d%20#%20e",
  158. "origin": "http://f:21",
  159. "protocol": "http:",
  160. "username": "",
  161. "password": "",
  162. "host": "f:21",
  163. "hostname": "f",
  164. "port": "21",
  165. "pathname": "/%20b%20",
  166. "search": "?%20d%20",
  167. "hash": "#%20e"
  168. },
  169. {
  170. "input": "lolscheme:x x#x x",
  171. "base": "about:blank",
  172. "href": "lolscheme:x x#x%20x",
  173. "protocol": "lolscheme:",
  174. "username": "",
  175. "password": "",
  176. "host": "",
  177. "hostname": "",
  178. "port": "",
  179. "pathname": "x x",
  180. "search": "",
  181. "hash": "#x%20x"
  182. },
  183. {
  184. "input": "http://f:/c",
  185. "base": "http://example.org/foo/bar",
  186. "href": "http://f/c",
  187. "origin": "http://f",
  188. "protocol": "http:",
  189. "username": "",
  190. "password": "",
  191. "host": "f",
  192. "hostname": "f",
  193. "port": "",
  194. "pathname": "/c",
  195. "search": "",
  196. "hash": ""
  197. },
  198. {
  199. "input": "http://f:0/c",
  200. "base": "http://example.org/foo/bar",
  201. "href": "http://f:0/c",
  202. "origin": "http://f:0",
  203. "protocol": "http:",
  204. "username": "",
  205. "password": "",
  206. "host": "f:0",
  207. "hostname": "f",
  208. "port": "0",
  209. "pathname": "/c",
  210. "search": "",
  211. "hash": ""
  212. },
  213. {
  214. "input": "http://f:00000000000000/c",
  215. "base": "http://example.org/foo/bar",
  216. "href": "http://f:0/c",
  217. "origin": "http://f:0",
  218. "protocol": "http:",
  219. "username": "",
  220. "password": "",
  221. "host": "f:0",
  222. "hostname": "f",
  223. "port": "0",
  224. "pathname": "/c",
  225. "search": "",
  226. "hash": ""
  227. },
  228. {
  229. "input": "http://f:00000000000000000000080/c",
  230. "base": "http://example.org/foo/bar",
  231. "href": "http://f/c",
  232. "origin": "http://f",
  233. "protocol": "http:",
  234. "username": "",
  235. "password": "",
  236. "host": "f",
  237. "hostname": "f",
  238. "port": "",
  239. "pathname": "/c",
  240. "search": "",
  241. "hash": ""
  242. },
  243. {
  244. "input": "http://f:b/c",
  245. "base": "http://example.org/foo/bar",
  246. "failure": true
  247. },
  248. {
  249. "input": "http://f: /c",
  250. "base": "http://example.org/foo/bar",
  251. "failure": true
  252. },
  253. {
  254. "input": "http://f:\n/c",
  255. "base": "http://example.org/foo/bar",
  256. "href": "http://f/c",
  257. "origin": "http://f",
  258. "protocol": "http:",
  259. "username": "",
  260. "password": "",
  261. "host": "f",
  262. "hostname": "f",
  263. "port": "",
  264. "pathname": "/c",
  265. "search": "",
  266. "hash": ""
  267. },
  268. {
  269. "input": "http://f:fifty-two/c",
  270. "base": "http://example.org/foo/bar",
  271. "failure": true
  272. },
  273. {
  274. "input": "http://f:999999/c",
  275. "base": "http://example.org/foo/bar",
  276. "failure": true
  277. },
  278. {
  279. "input": "non-special://f:999999/c",
  280. "base": "http://example.org/foo/bar",
  281. "failure": true
  282. },
  283. {
  284. "input": "http://f: 21 / b ? d # e ",
  285. "base": "http://example.org/foo/bar",
  286. "failure": true
  287. },
  288. {
  289. "input": "",
  290. "base": "http://example.org/foo/bar",
  291. "href": "http://example.org/foo/bar",
  292. "origin": "http://example.org",
  293. "protocol": "http:",
  294. "username": "",
  295. "password": "",
  296. "host": "example.org",
  297. "hostname": "example.org",
  298. "port": "",
  299. "pathname": "/foo/bar",
  300. "search": "",
  301. "hash": ""
  302. },
  303. {
  304. "input": " \t",
  305. "base": "http://example.org/foo/bar",
  306. "href": "http://example.org/foo/bar",
  307. "origin": "http://example.org",
  308. "protocol": "http:",
  309. "username": "",
  310. "password": "",
  311. "host": "example.org",
  312. "hostname": "example.org",
  313. "port": "",
  314. "pathname": "/foo/bar",
  315. "search": "",
  316. "hash": ""
  317. },
  318. {
  319. "input": ":foo.com/",
  320. "base": "http://example.org/foo/bar",
  321. "href": "http://example.org/foo/:foo.com/",
  322. "origin": "http://example.org",
  323. "protocol": "http:",
  324. "username": "",
  325. "password": "",
  326. "host": "example.org",
  327. "hostname": "example.org",
  328. "port": "",
  329. "pathname": "/foo/:foo.com/",
  330. "search": "",
  331. "hash": ""
  332. },
  333. {
  334. "input": ":foo.com\\",
  335. "base": "http://example.org/foo/bar",
  336. "href": "http://example.org/foo/:foo.com/",
  337. "origin": "http://example.org",
  338. "protocol": "http:",
  339. "username": "",
  340. "password": "",
  341. "host": "example.org",
  342. "hostname": "example.org",
  343. "port": "",
  344. "pathname": "/foo/:foo.com/",
  345. "search": "",
  346. "hash": ""
  347. },
  348. {
  349. "input": ":",
  350. "base": "http://example.org/foo/bar",
  351. "href": "http://example.org/foo/:",
  352. "origin": "http://example.org",
  353. "protocol": "http:",
  354. "username": "",
  355. "password": "",
  356. "host": "example.org",
  357. "hostname": "example.org",
  358. "port": "",
  359. "pathname": "/foo/:",
  360. "search": "",
  361. "hash": ""
  362. },
  363. {
  364. "input": ":a",
  365. "base": "http://example.org/foo/bar",
  366. "href": "http://example.org/foo/:a",
  367. "origin": "http://example.org",
  368. "protocol": "http:",
  369. "username": "",
  370. "password": "",
  371. "host": "example.org",
  372. "hostname": "example.org",
  373. "port": "",
  374. "pathname": "/foo/:a",
  375. "search": "",
  376. "hash": ""
  377. },
  378. {
  379. "input": ":/",
  380. "base": "http://example.org/foo/bar",
  381. "href": "http://example.org/foo/:/",
  382. "origin": "http://example.org",
  383. "protocol": "http:",
  384. "username": "",
  385. "password": "",
  386. "host": "example.org",
  387. "hostname": "example.org",
  388. "port": "",
  389. "pathname": "/foo/:/",
  390. "search": "",
  391. "hash": ""
  392. },
  393. {
  394. "input": ":\\",
  395. "base": "http://example.org/foo/bar",
  396. "href": "http://example.org/foo/:/",
  397. "origin": "http://example.org",
  398. "protocol": "http:",
  399. "username": "",
  400. "password": "",
  401. "host": "example.org",
  402. "hostname": "example.org",
  403. "port": "",
  404. "pathname": "/foo/:/",
  405. "search": "",
  406. "hash": ""
  407. },
  408. {
  409. "input": ":#",
  410. "base": "http://example.org/foo/bar",
  411. "href": "http://example.org/foo/:#",
  412. "origin": "http://example.org",
  413. "protocol": "http:",
  414. "username": "",
  415. "password": "",
  416. "host": "example.org",
  417. "hostname": "example.org",
  418. "port": "",
  419. "pathname": "/foo/:",
  420. "search": "",
  421. "hash": ""
  422. },
  423. {
  424. "input": "#",
  425. "base": "http://example.org/foo/bar",
  426. "href": "http://example.org/foo/bar#",
  427. "origin": "http://example.org",
  428. "protocol": "http:",
  429. "username": "",
  430. "password": "",
  431. "host": "example.org",
  432. "hostname": "example.org",
  433. "port": "",
  434. "pathname": "/foo/bar",
  435. "search": "",
  436. "hash": ""
  437. },
  438. {
  439. "input": "#/",
  440. "base": "http://example.org/foo/bar",
  441. "href": "http://example.org/foo/bar#/",
  442. "origin": "http://example.org",
  443. "protocol": "http:",
  444. "username": "",
  445. "password": "",
  446. "host": "example.org",
  447. "hostname": "example.org",
  448. "port": "",
  449. "pathname": "/foo/bar",
  450. "search": "",
  451. "hash": "#/"
  452. },
  453. {
  454. "input": "#\\",
  455. "base": "http://example.org/foo/bar",
  456. "href": "http://example.org/foo/bar#\\",
  457. "origin": "http://example.org",
  458. "protocol": "http:",
  459. "username": "",
  460. "password": "",
  461. "host": "example.org",
  462. "hostname": "example.org",
  463. "port": "",
  464. "pathname": "/foo/bar",
  465. "search": "",
  466. "hash": "#\\"
  467. },
  468. {
  469. "input": "#;?",
  470. "base": "http://example.org/foo/bar",
  471. "href": "http://example.org/foo/bar#;?",
  472. "origin": "http://example.org",
  473. "protocol": "http:",
  474. "username": "",
  475. "password": "",
  476. "host": "example.org",
  477. "hostname": "example.org",
  478. "port": "",
  479. "pathname": "/foo/bar",
  480. "search": "",
  481. "hash": "#;?"
  482. },
  483. {
  484. "input": "?",
  485. "base": "http://example.org/foo/bar",
  486. "href": "http://example.org/foo/bar?",
  487. "origin": "http://example.org",
  488. "protocol": "http:",
  489. "username": "",
  490. "password": "",
  491. "host": "example.org",
  492. "hostname": "example.org",
  493. "port": "",
  494. "pathname": "/foo/bar",
  495. "search": "",
  496. "hash": ""
  497. },
  498. {
  499. "input": "/",
  500. "base": "http://example.org/foo/bar",
  501. "href": "http://example.org/",
  502. "origin": "http://example.org",
  503. "protocol": "http:",
  504. "username": "",
  505. "password": "",
  506. "host": "example.org",
  507. "hostname": "example.org",
  508. "port": "",
  509. "pathname": "/",
  510. "search": "",
  511. "hash": ""
  512. },
  513. {
  514. "input": ":23",
  515. "base": "http://example.org/foo/bar",
  516. "href": "http://example.org/foo/:23",
  517. "origin": "http://example.org",
  518. "protocol": "http:",
  519. "username": "",
  520. "password": "",
  521. "host": "example.org",
  522. "hostname": "example.org",
  523. "port": "",
  524. "pathname": "/foo/:23",
  525. "search": "",
  526. "hash": ""
  527. },
  528. {
  529. "input": "/:23",
  530. "base": "http://example.org/foo/bar",
  531. "href": "http://example.org/:23",
  532. "origin": "http://example.org",
  533. "protocol": "http:",
  534. "username": "",
  535. "password": "",
  536. "host": "example.org",
  537. "hostname": "example.org",
  538. "port": "",
  539. "pathname": "/:23",
  540. "search": "",
  541. "hash": ""
  542. },
  543. {
  544. "input": "\\x",
  545. "base": "http://example.org/foo/bar",
  546. "href": "http://example.org/x",
  547. "origin": "http://example.org",
  548. "protocol": "http:",
  549. "username": "",
  550. "password": "",
  551. "host": "example.org",
  552. "hostname": "example.org",
  553. "port": "",
  554. "pathname": "/x",
  555. "search": "",
  556. "hash": ""
  557. },
  558. {
  559. "input": "\\\\x\\hello",
  560. "base": "http://example.org/foo/bar",
  561. "href": "http://x/hello",
  562. "origin": "http://x",
  563. "protocol": "http:",
  564. "username": "",
  565. "password": "",
  566. "host": "x",
  567. "hostname": "x",
  568. "port": "",
  569. "pathname": "/hello",
  570. "search": "",
  571. "hash": ""
  572. },
  573. {
  574. "input": "::",
  575. "base": "http://example.org/foo/bar",
  576. "href": "http://example.org/foo/::",
  577. "origin": "http://example.org",
  578. "protocol": "http:",
  579. "username": "",
  580. "password": "",
  581. "host": "example.org",
  582. "hostname": "example.org",
  583. "port": "",
  584. "pathname": "/foo/::",
  585. "search": "",
  586. "hash": ""
  587. },
  588. {
  589. "input": "::23",
  590. "base": "http://example.org/foo/bar",
  591. "href": "http://example.org/foo/::23",
  592. "origin": "http://example.org",
  593. "protocol": "http:",
  594. "username": "",
  595. "password": "",
  596. "host": "example.org",
  597. "hostname": "example.org",
  598. "port": "",
  599. "pathname": "/foo/::23",
  600. "search": "",
  601. "hash": ""
  602. },
  603. {
  604. "input": "foo://",
  605. "base": "http://example.org/foo/bar",
  606. "href": "foo://",
  607. "origin": "null",
  608. "protocol": "foo:",
  609. "username": "",
  610. "password": "",
  611. "host": "",
  612. "hostname": "",
  613. "port": "",
  614. "pathname": "",
  615. "search": "",
  616. "hash": ""
  617. },
  618. {
  619. "input": "http://a:b@c:29/d",
  620. "base": "http://example.org/foo/bar",
  621. "href": "http://a:b@c:29/d",
  622. "origin": "http://c:29",
  623. "protocol": "http:",
  624. "username": "a",
  625. "password": "b",
  626. "host": "c:29",
  627. "hostname": "c",
  628. "port": "29",
  629. "pathname": "/d",
  630. "search": "",
  631. "hash": ""
  632. },
  633. {
  634. "input": "http::@c:29",
  635. "base": "http://example.org/foo/bar",
  636. "href": "http://example.org/foo/:@c:29",
  637. "origin": "http://example.org",
  638. "protocol": "http:",
  639. "username": "",
  640. "password": "",
  641. "host": "example.org",
  642. "hostname": "example.org",
  643. "port": "",
  644. "pathname": "/foo/:@c:29",
  645. "search": "",
  646. "hash": ""
  647. },
  648. {
  649. "input": "http://&a:foo(b]c@d:2/",
  650. "base": "http://example.org/foo/bar",
  651. "href": "http://&a:foo(b%5Dc@d:2/",
  652. "origin": "http://d:2",
  653. "protocol": "http:",
  654. "username": "&a",
  655. "password": "foo(b%5Dc",
  656. "host": "d:2",
  657. "hostname": "d",
  658. "port": "2",
  659. "pathname": "/",
  660. "search": "",
  661. "hash": ""
  662. },
  663. {
  664. "input": "http://::@c@d:2",
  665. "base": "http://example.org/foo/bar",
  666. "href": "http://:%3A%40c@d:2/",
  667. "origin": "http://d:2",
  668. "protocol": "http:",
  669. "username": "",
  670. "password": "%3A%40c",
  671. "host": "d:2",
  672. "hostname": "d",
  673. "port": "2",
  674. "pathname": "/",
  675. "search": "",
  676. "hash": ""
  677. },
  678. {
  679. "input": "http://foo.com:b@d/",
  680. "base": "http://example.org/foo/bar",
  681. "href": "http://foo.com:b@d/",
  682. "origin": "http://d",
  683. "protocol": "http:",
  684. "username": "foo.com",
  685. "password": "b",
  686. "host": "d",
  687. "hostname": "d",
  688. "port": "",
  689. "pathname": "/",
  690. "search": "",
  691. "hash": ""
  692. },
  693. {
  694. "input": "http://foo.com/\\@",
  695. "base": "http://example.org/foo/bar",
  696. "href": "http://foo.com//@",
  697. "origin": "http://foo.com",
  698. "protocol": "http:",
  699. "username": "",
  700. "password": "",
  701. "host": "foo.com",
  702. "hostname": "foo.com",
  703. "port": "",
  704. "pathname": "//@",
  705. "search": "",
  706. "hash": ""
  707. },
  708. {
  709. "input": "http:\\\\foo.com\\",
  710. "base": "http://example.org/foo/bar",
  711. "href": "http://foo.com/",
  712. "origin": "http://foo.com",
  713. "protocol": "http:",
  714. "username": "",
  715. "password": "",
  716. "host": "foo.com",
  717. "hostname": "foo.com",
  718. "port": "",
  719. "pathname": "/",
  720. "search": "",
  721. "hash": ""
  722. },
  723. {
  724. "input": "http:\\\\a\\b:c\\d@foo.com\\",
  725. "base": "http://example.org/foo/bar",
  726. "href": "http://a/b:c/d@foo.com/",
  727. "origin": "http://a",
  728. "protocol": "http:",
  729. "username": "",
  730. "password": "",
  731. "host": "a",
  732. "hostname": "a",
  733. "port": "",
  734. "pathname": "/b:c/d@foo.com/",
  735. "search": "",
  736. "hash": ""
  737. },
  738. {
  739. "input": "foo:/",
  740. "base": "http://example.org/foo/bar",
  741. "href": "foo:/",
  742. "origin": "null",
  743. "protocol": "foo:",
  744. "username": "",
  745. "password": "",
  746. "host": "",
  747. "hostname": "",
  748. "port": "",
  749. "pathname": "/",
  750. "search": "",
  751. "hash": ""
  752. },
  753. {
  754. "input": "foo:/bar.com/",
  755. "base": "http://example.org/foo/bar",
  756. "href": "foo:/bar.com/",
  757. "origin": "null",
  758. "protocol": "foo:",
  759. "username": "",
  760. "password": "",
  761. "host": "",
  762. "hostname": "",
  763. "port": "",
  764. "pathname": "/bar.com/",
  765. "search": "",
  766. "hash": ""
  767. },
  768. {
  769. "input": "foo://///////",
  770. "base": "http://example.org/foo/bar",
  771. "href": "foo://///////",
  772. "origin": "null",
  773. "protocol": "foo:",
  774. "username": "",
  775. "password": "",
  776. "host": "",
  777. "hostname": "",
  778. "port": "",
  779. "pathname": "///////",
  780. "search": "",
  781. "hash": ""
  782. },
  783. {
  784. "input": "foo://///////bar.com/",
  785. "base": "http://example.org/foo/bar",
  786. "href": "foo://///////bar.com/",
  787. "origin": "null",
  788. "protocol": "foo:",
  789. "username": "",
  790. "password": "",
  791. "host": "",
  792. "hostname": "",
  793. "port": "",
  794. "pathname": "///////bar.com/",
  795. "search": "",
  796. "hash": ""
  797. },
  798. {
  799. "input": "foo:////://///",
  800. "base": "http://example.org/foo/bar",
  801. "href": "foo:////://///",
  802. "origin": "null",
  803. "protocol": "foo:",
  804. "username": "",
  805. "password": "",
  806. "host": "",
  807. "hostname": "",
  808. "port": "",
  809. "pathname": "//://///",
  810. "search": "",
  811. "hash": ""
  812. },
  813. {
  814. "input": "c:/foo",
  815. "base": "http://example.org/foo/bar",
  816. "href": "c:/foo",
  817. "origin": "null",
  818. "protocol": "c:",
  819. "username": "",
  820. "password": "",
  821. "host": "",
  822. "hostname": "",
  823. "port": "",
  824. "pathname": "/foo",
  825. "search": "",
  826. "hash": ""
  827. },
  828. {
  829. "input": "//foo/bar",
  830. "base": "http://example.org/foo/bar",
  831. "href": "http://foo/bar",
  832. "origin": "http://foo",
  833. "protocol": "http:",
  834. "username": "",
  835. "password": "",
  836. "host": "foo",
  837. "hostname": "foo",
  838. "port": "",
  839. "pathname": "/bar",
  840. "search": "",
  841. "hash": ""
  842. },
  843. {
  844. "input": "http://foo/path;a??e#f#g",
  845. "base": "http://example.org/foo/bar",
  846. "href": "http://foo/path;a??e#f#g",
  847. "origin": "http://foo",
  848. "protocol": "http:",
  849. "username": "",
  850. "password": "",
  851. "host": "foo",
  852. "hostname": "foo",
  853. "port": "",
  854. "pathname": "/path;a",
  855. "search": "??e",
  856. "hash": "#f#g"
  857. },
  858. {
  859. "input": "http://foo/abcd?efgh?ijkl",
  860. "base": "http://example.org/foo/bar",
  861. "href": "http://foo/abcd?efgh?ijkl",
  862. "origin": "http://foo",
  863. "protocol": "http:",
  864. "username": "",
  865. "password": "",
  866. "host": "foo",
  867. "hostname": "foo",
  868. "port": "",
  869. "pathname": "/abcd",
  870. "search": "?efgh?ijkl",
  871. "hash": ""
  872. },
  873. {
  874. "input": "http://foo/abcd#foo?bar",
  875. "base": "http://example.org/foo/bar",
  876. "href": "http://foo/abcd#foo?bar",
  877. "origin": "http://foo",
  878. "protocol": "http:",
  879. "username": "",
  880. "password": "",
  881. "host": "foo",
  882. "hostname": "foo",
  883. "port": "",
  884. "pathname": "/abcd",
  885. "search": "",
  886. "hash": "#foo?bar"
  887. },
  888. {
  889. "input": "[61:24:74]:98",
  890. "base": "http://example.org/foo/bar",
  891. "href": "http://example.org/foo/[61:24:74]:98",
  892. "origin": "http://example.org",
  893. "protocol": "http:",
  894. "username": "",
  895. "password": "",
  896. "host": "example.org",
  897. "hostname": "example.org",
  898. "port": "",
  899. "pathname": "/foo/[61:24:74]:98",
  900. "search": "",
  901. "hash": ""
  902. },
  903. {
  904. "input": "http:[61:27]/:foo",
  905. "base": "http://example.org/foo/bar",
  906. "href": "http://example.org/foo/[61:27]/:foo",
  907. "origin": "http://example.org",
  908. "protocol": "http:",
  909. "username": "",
  910. "password": "",
  911. "host": "example.org",
  912. "hostname": "example.org",
  913. "port": "",
  914. "pathname": "/foo/[61:27]/:foo",
  915. "search": "",
  916. "hash": ""
  917. },
  918. {
  919. "input": "http://[1::2]:3:4",
  920. "base": "http://example.org/foo/bar",
  921. "failure": true
  922. },
  923. {
  924. "input": "http://2001::1",
  925. "base": "http://example.org/foo/bar",
  926. "failure": true
  927. },
  928. {
  929. "input": "http://2001::1]",
  930. "base": "http://example.org/foo/bar",
  931. "failure": true
  932. },
  933. {
  934. "input": "http://2001::1]:80",
  935. "base": "http://example.org/foo/bar",
  936. "failure": true
  937. },
  938. {
  939. "input": "http://[2001::1]",
  940. "base": "http://example.org/foo/bar",
  941. "href": "http://[2001::1]/",
  942. "origin": "http://[2001::1]",
  943. "protocol": "http:",
  944. "username": "",
  945. "password": "",
  946. "host": "[2001::1]",
  947. "hostname": "[2001::1]",
  948. "port": "",
  949. "pathname": "/",
  950. "search": "",
  951. "hash": ""
  952. },
  953. {
  954. "input": "http://[::127.0.0.1]",
  955. "base": "http://example.org/foo/bar",
  956. "href": "http://[::7f00:1]/",
  957. "origin": "http://[::7f00:1]",
  958. "protocol": "http:",
  959. "username": "",
  960. "password": "",
  961. "host": "[::7f00:1]",
  962. "hostname": "[::7f00:1]",
  963. "port": "",
  964. "pathname": "/",
  965. "search": "",
  966. "hash": ""
  967. },
  968. {
  969. "input": "http://[0:0:0:0:0:0:13.1.68.3]",
  970. "base": "http://example.org/foo/bar",
  971. "href": "http://[::d01:4403]/",
  972. "origin": "http://[::d01:4403]",
  973. "protocol": "http:",
  974. "username": "",
  975. "password": "",
  976. "host": "[::d01:4403]",
  977. "hostname": "[::d01:4403]",
  978. "port": "",
  979. "pathname": "/",
  980. "search": "",
  981. "hash": ""
  982. },
  983. {
  984. "input": "http://[2001::1]:80",
  985. "base": "http://example.org/foo/bar",
  986. "href": "http://[2001::1]/",
  987. "origin": "http://[2001::1]",
  988. "protocol": "http:",
  989. "username": "",
  990. "password": "",
  991. "host": "[2001::1]",
  992. "hostname": "[2001::1]",
  993. "port": "",
  994. "pathname": "/",
  995. "search": "",
  996. "hash": ""
  997. },
  998. {
  999. "input": "http:/example.com/",
  1000. "base": "http://example.org/foo/bar",
  1001. "href": "http://example.org/example.com/",
  1002. "origin": "http://example.org",
  1003. "protocol": "http:",
  1004. "username": "",
  1005. "password": "",
  1006. "host": "example.org",
  1007. "hostname": "example.org",
  1008. "port": "",
  1009. "pathname": "/example.com/",
  1010. "search": "",
  1011. "hash": ""
  1012. },
  1013. {
  1014. "input": "ftp:/example.com/",
  1015. "base": "http://example.org/foo/bar",
  1016. "href": "ftp://example.com/",
  1017. "origin": "ftp://example.com",
  1018. "protocol": "ftp:",
  1019. "username": "",
  1020. "password": "",
  1021. "host": "example.com",
  1022. "hostname": "example.com",
  1023. "port": "",
  1024. "pathname": "/",
  1025. "search": "",
  1026. "hash": ""
  1027. },
  1028. {
  1029. "input": "https:/example.com/",
  1030. "base": "http://example.org/foo/bar",
  1031. "href": "https://example.com/",
  1032. "origin": "https://example.com",
  1033. "protocol": "https:",
  1034. "username": "",
  1035. "password": "",
  1036. "host": "example.com",
  1037. "hostname": "example.com",
  1038. "port": "",
  1039. "pathname": "/",
  1040. "search": "",
  1041. "hash": ""
  1042. },
  1043. {
  1044. "input": "madeupscheme:/example.com/",
  1045. "base": "http://example.org/foo/bar",
  1046. "href": "madeupscheme:/example.com/",
  1047. "origin": "null",
  1048. "protocol": "madeupscheme:",
  1049. "username": "",
  1050. "password": "",
  1051. "host": "",
  1052. "hostname": "",
  1053. "port": "",
  1054. "pathname": "/example.com/",
  1055. "search": "",
  1056. "hash": ""
  1057. },
  1058. {
  1059. "input": "file:/example.com/",
  1060. "base": "http://example.org/foo/bar",
  1061. "href": "file:///example.com/",
  1062. "protocol": "file:",
  1063. "username": "",
  1064. "password": "",
  1065. "host": "",
  1066. "hostname": "",
  1067. "port": "",
  1068. "pathname": "/example.com/",
  1069. "search": "",
  1070. "hash": ""
  1071. },
  1072. {
  1073. "input": "file://example:1/",
  1074. "base": "about:blank",
  1075. "failure": true
  1076. },
  1077. {
  1078. "input": "file://example:test/",
  1079. "base": "about:blank",
  1080. "failure": true
  1081. },
  1082. {
  1083. "input": "file://example%/",
  1084. "base": "about:blank",
  1085. "failure": true
  1086. },
  1087. {
  1088. "input": "file://[example]/",
  1089. "base": "about:blank",
  1090. "failure": true
  1091. },
  1092. {
  1093. "input": "ftps:/example.com/",
  1094. "base": "http://example.org/foo/bar",
  1095. "href": "ftps:/example.com/",
  1096. "origin": "null",
  1097. "protocol": "ftps:",
  1098. "username": "",
  1099. "password": "",
  1100. "host": "",
  1101. "hostname": "",
  1102. "port": "",
  1103. "pathname": "/example.com/",
  1104. "search": "",
  1105. "hash": ""
  1106. },
  1107. {
  1108. "input": "gopher:/example.com/",
  1109. "base": "http://example.org/foo/bar",
  1110. "href": "gopher:/example.com/",
  1111. "origin": "null",
  1112. "protocol": "gopher:",
  1113. "username": "",
  1114. "password": "",
  1115. "host": "",
  1116. "hostname": "",
  1117. "port": "",
  1118. "pathname": "/example.com/",
  1119. "search": "",
  1120. "hash": ""
  1121. },
  1122. {
  1123. "input": "ws:/example.com/",
  1124. "base": "http://example.org/foo/bar",
  1125. "href": "ws://example.com/",
  1126. "origin": "ws://example.com",
  1127. "protocol": "ws:",
  1128. "username": "",
  1129. "password": "",
  1130. "host": "example.com",
  1131. "hostname": "example.com",
  1132. "port": "",
  1133. "pathname": "/",
  1134. "search": "",
  1135. "hash": ""
  1136. },
  1137. {
  1138. "input": "wss:/example.com/",
  1139. "base": "http://example.org/foo/bar",
  1140. "href": "wss://example.com/",
  1141. "origin": "wss://example.com",
  1142. "protocol": "wss:",
  1143. "username": "",
  1144. "password": "",
  1145. "host": "example.com",
  1146. "hostname": "example.com",
  1147. "port": "",
  1148. "pathname": "/",
  1149. "search": "",
  1150. "hash": ""
  1151. },
  1152. {
  1153. "input": "data:/example.com/",
  1154. "base": "http://example.org/foo/bar",
  1155. "href": "data:/example.com/",
  1156. "origin": "null",
  1157. "protocol": "data:",
  1158. "username": "",
  1159. "password": "",
  1160. "host": "",
  1161. "hostname": "",
  1162. "port": "",
  1163. "pathname": "/example.com/",
  1164. "search": "",
  1165. "hash": ""
  1166. },
  1167. {
  1168. "input": "javascript:/example.com/",
  1169. "base": "http://example.org/foo/bar",
  1170. "href": "javascript:/example.com/",
  1171. "origin": "null",
  1172. "protocol": "javascript:",
  1173. "username": "",
  1174. "password": "",
  1175. "host": "",
  1176. "hostname": "",
  1177. "port": "",
  1178. "pathname": "/example.com/",
  1179. "search": "",
  1180. "hash": ""
  1181. },
  1182. {
  1183. "input": "mailto:/example.com/",
  1184. "base": "http://example.org/foo/bar",
  1185. "href": "mailto:/example.com/",
  1186. "origin": "null",
  1187. "protocol": "mailto:",
  1188. "username": "",
  1189. "password": "",
  1190. "host": "",
  1191. "hostname": "",
  1192. "port": "",
  1193. "pathname": "/example.com/",
  1194. "search": "",
  1195. "hash": ""
  1196. },
  1197. {
  1198. "input": "http:example.com/",
  1199. "base": "http://example.org/foo/bar",
  1200. "href": "http://example.org/foo/example.com/",
  1201. "origin": "http://example.org",
  1202. "protocol": "http:",
  1203. "username": "",
  1204. "password": "",
  1205. "host": "example.org",
  1206. "hostname": "example.org",
  1207. "port": "",
  1208. "pathname": "/foo/example.com/",
  1209. "search": "",
  1210. "hash": ""
  1211. },
  1212. {
  1213. "input": "ftp:example.com/",
  1214. "base": "http://example.org/foo/bar",
  1215. "href": "ftp://example.com/",
  1216. "origin": "ftp://example.com",
  1217. "protocol": "ftp:",
  1218. "username": "",
  1219. "password": "",
  1220. "host": "example.com",
  1221. "hostname": "example.com",
  1222. "port": "",
  1223. "pathname": "/",
  1224. "search": "",
  1225. "hash": ""
  1226. },
  1227. {
  1228. "input": "https:example.com/",
  1229. "base": "http://example.org/foo/bar",
  1230. "href": "https://example.com/",
  1231. "origin": "https://example.com",
  1232. "protocol": "https:",
  1233. "username": "",
  1234. "password": "",
  1235. "host": "example.com",
  1236. "hostname": "example.com",
  1237. "port": "",
  1238. "pathname": "/",
  1239. "search": "",
  1240. "hash": ""
  1241. },
  1242. {
  1243. "input": "madeupscheme:example.com/",
  1244. "base": "http://example.org/foo/bar",
  1245. "href": "madeupscheme:example.com/",
  1246. "origin": "null",
  1247. "protocol": "madeupscheme:",
  1248. "username": "",
  1249. "password": "",
  1250. "host": "",
  1251. "hostname": "",
  1252. "port": "",
  1253. "pathname": "example.com/",
  1254. "search": "",
  1255. "hash": ""
  1256. },
  1257. {
  1258. "input": "ftps:example.com/",
  1259. "base": "http://example.org/foo/bar",
  1260. "href": "ftps:example.com/",
  1261. "origin": "null",
  1262. "protocol": "ftps:",
  1263. "username": "",
  1264. "password": "",
  1265. "host": "",
  1266. "hostname": "",
  1267. "port": "",
  1268. "pathname": "example.com/",
  1269. "search": "",
  1270. "hash": ""
  1271. },
  1272. {
  1273. "input": "gopher:example.com/",
  1274. "base": "http://example.org/foo/bar",
  1275. "href": "gopher:example.com/",
  1276. "origin": "null",
  1277. "protocol": "gopher:",
  1278. "username": "",
  1279. "password": "",
  1280. "host": "",
  1281. "hostname": "",
  1282. "port": "",
  1283. "pathname": "example.com/",
  1284. "search": "",
  1285. "hash": ""
  1286. },
  1287. {
  1288. "input": "ws:example.com/",
  1289. "base": "http://example.org/foo/bar",
  1290. "href": "ws://example.com/",
  1291. "origin": "ws://example.com",
  1292. "protocol": "ws:",
  1293. "username": "",
  1294. "password": "",
  1295. "host": "example.com",
  1296. "hostname": "example.com",
  1297. "port": "",
  1298. "pathname": "/",
  1299. "search": "",
  1300. "hash": ""
  1301. },
  1302. {
  1303. "input": "wss:example.com/",
  1304. "base": "http://example.org/foo/bar",
  1305. "href": "wss://example.com/",
  1306. "origin": "wss://example.com",
  1307. "protocol": "wss:",
  1308. "username": "",
  1309. "password": "",
  1310. "host": "example.com",
  1311. "hostname": "example.com",
  1312. "port": "",
  1313. "pathname": "/",
  1314. "search": "",
  1315. "hash": ""
  1316. },
  1317. {
  1318. "input": "data:example.com/",
  1319. "base": "http://example.org/foo/bar",
  1320. "href": "data:example.com/",
  1321. "origin": "null",
  1322. "protocol": "data:",
  1323. "username": "",
  1324. "password": "",
  1325. "host": "",
  1326. "hostname": "",
  1327. "port": "",
  1328. "pathname": "example.com/",
  1329. "search": "",
  1330. "hash": ""
  1331. },
  1332. {
  1333. "input": "javascript:example.com/",
  1334. "base": "http://example.org/foo/bar",
  1335. "href": "javascript:example.com/",
  1336. "origin": "null",
  1337. "protocol": "javascript:",
  1338. "username": "",
  1339. "password": "",
  1340. "host": "",
  1341. "hostname": "",
  1342. "port": "",
  1343. "pathname": "example.com/",
  1344. "search": "",
  1345. "hash": ""
  1346. },
  1347. {
  1348. "input": "mailto:example.com/",
  1349. "base": "http://example.org/foo/bar",
  1350. "href": "mailto:example.com/",
  1351. "origin": "null",
  1352. "protocol": "mailto:",
  1353. "username": "",
  1354. "password": "",
  1355. "host": "",
  1356. "hostname": "",
  1357. "port": "",
  1358. "pathname": "example.com/",
  1359. "search": "",
  1360. "hash": ""
  1361. },
  1362. {
  1363. "input": "/a/b/c",
  1364. "base": "http://example.org/foo/bar",
  1365. "href": "http://example.org/a/b/c",
  1366. "origin": "http://example.org",
  1367. "protocol": "http:",
  1368. "username": "",
  1369. "password": "",
  1370. "host": "example.org",
  1371. "hostname": "example.org",
  1372. "port": "",
  1373. "pathname": "/a/b/c",
  1374. "search": "",
  1375. "hash": ""
  1376. },
  1377. {
  1378. "input": "/a/ /c",
  1379. "base": "http://example.org/foo/bar",
  1380. "href": "http://example.org/a/%20/c",
  1381. "origin": "http://example.org",
  1382. "protocol": "http:",
  1383. "username": "",
  1384. "password": "",
  1385. "host": "example.org",
  1386. "hostname": "example.org",
  1387. "port": "",
  1388. "pathname": "/a/%20/c",
  1389. "search": "",
  1390. "hash": ""
  1391. },
  1392. {
  1393. "input": "/a%2fc",
  1394. "base": "http://example.org/foo/bar",
  1395. "href": "http://example.org/a%2fc",
  1396. "origin": "http://example.org",
  1397. "protocol": "http:",
  1398. "username": "",
  1399. "password": "",
  1400. "host": "example.org",
  1401. "hostname": "example.org",
  1402. "port": "",
  1403. "pathname": "/a%2fc",
  1404. "search": "",
  1405. "hash": ""
  1406. },
  1407. {
  1408. "input": "/a/%2f/c",
  1409. "base": "http://example.org/foo/bar",
  1410. "href": "http://example.org/a/%2f/c",
  1411. "origin": "http://example.org",
  1412. "protocol": "http:",
  1413. "username": "",
  1414. "password": "",
  1415. "host": "example.org",
  1416. "hostname": "example.org",
  1417. "port": "",
  1418. "pathname": "/a/%2f/c",
  1419. "search": "",
  1420. "hash": ""
  1421. },
  1422. {
  1423. "input": "#β",
  1424. "base": "http://example.org/foo/bar",
  1425. "href": "http://example.org/foo/bar#%CE%B2",
  1426. "origin": "http://example.org",
  1427. "protocol": "http:",
  1428. "username": "",
  1429. "password": "",
  1430. "host": "example.org",
  1431. "hostname": "example.org",
  1432. "port": "",
  1433. "pathname": "/foo/bar",
  1434. "search": "",
  1435. "hash": "#%CE%B2"
  1436. },
  1437. {
  1438. "input": "data:text/html,test#test",
  1439. "base": "http://example.org/foo/bar",
  1440. "href": "data:text/html,test#test",
  1441. "origin": "null",
  1442. "protocol": "data:",
  1443. "username": "",
  1444. "password": "",
  1445. "host": "",
  1446. "hostname": "",
  1447. "port": "",
  1448. "pathname": "text/html,test",
  1449. "search": "",
  1450. "hash": "#test"
  1451. },
  1452. {
  1453. "input": "tel:1234567890",
  1454. "base": "http://example.org/foo/bar",
  1455. "href": "tel:1234567890",
  1456. "origin": "null",
  1457. "protocol": "tel:",
  1458. "username": "",
  1459. "password": "",
  1460. "host": "",
  1461. "hostname": "",
  1462. "port": "",
  1463. "pathname": "1234567890",
  1464. "search": "",
  1465. "hash": ""
  1466. },
  1467. "# Based on https://felixfbecker.github.io/whatwg-url-custom-host-repro/",
  1468. {
  1469. "input": "ssh://example.com/foo/bar.git",
  1470. "base": "http://example.org/",
  1471. "href": "ssh://example.com/foo/bar.git",
  1472. "origin": "null",
  1473. "protocol": "ssh:",
  1474. "username": "",
  1475. "password": "",
  1476. "host": "example.com",
  1477. "hostname": "example.com",
  1478. "port": "",
  1479. "pathname": "/foo/bar.git",
  1480. "search": "",
  1481. "hash": ""
  1482. },
  1483. "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html",
  1484. {
  1485. "input": "file:c:\\foo\\bar.html",
  1486. "base": "file:///tmp/mock/path",
  1487. "href": "file:///c:/foo/bar.html",
  1488. "protocol": "file:",
  1489. "username": "",
  1490. "password": "",
  1491. "host": "",
  1492. "hostname": "",
  1493. "port": "",
  1494. "pathname": "/c:/foo/bar.html",
  1495. "search": "",
  1496. "hash": ""
  1497. },
  1498. {
  1499. "input": " File:c|////foo\\bar.html",
  1500. "base": "file:///tmp/mock/path",
  1501. "href": "file:///c:////foo/bar.html",
  1502. "protocol": "file:",
  1503. "username": "",
  1504. "password": "",
  1505. "host": "",
  1506. "hostname": "",
  1507. "port": "",
  1508. "pathname": "/c:////foo/bar.html",
  1509. "search": "",
  1510. "hash": ""
  1511. },
  1512. {
  1513. "input": "C|/foo/bar",
  1514. "base": "file:///tmp/mock/path",
  1515. "href": "file:///C:/foo/bar",
  1516. "protocol": "file:",
  1517. "username": "",
  1518. "password": "",
  1519. "host": "",
  1520. "hostname": "",
  1521. "port": "",
  1522. "pathname": "/C:/foo/bar",
  1523. "search": "",
  1524. "hash": ""
  1525. },
  1526. {
  1527. "input": "/C|\\foo\\bar",
  1528. "base": "file:///tmp/mock/path",
  1529. "href": "file:///C:/foo/bar",
  1530. "protocol": "file:",
  1531. "username": "",
  1532. "password": "",
  1533. "host": "",
  1534. "hostname": "",
  1535. "port": "",
  1536. "pathname": "/C:/foo/bar",
  1537. "search": "",
  1538. "hash": ""
  1539. },
  1540. {
  1541. "input": "//C|/foo/bar",
  1542. "base": "file:///tmp/mock/path",
  1543. "href": "file:///C:/foo/bar",
  1544. "protocol": "file:",
  1545. "username": "",
  1546. "password": "",
  1547. "host": "",
  1548. "hostname": "",
  1549. "port": "",
  1550. "pathname": "/C:/foo/bar",
  1551. "search": "",
  1552. "hash": ""
  1553. },
  1554. {
  1555. "input": "//server/file",
  1556. "base": "file:///tmp/mock/path",
  1557. "href": "file://server/file",
  1558. "protocol": "file:",
  1559. "username": "",
  1560. "password": "",
  1561. "host": "server",
  1562. "hostname": "server",
  1563. "port": "",
  1564. "pathname": "/file",
  1565. "search": "",
  1566. "hash": ""
  1567. },
  1568. {
  1569. "input": "\\\\server\\file",
  1570. "base": "file:///tmp/mock/path",
  1571. "href": "file://server/file",
  1572. "protocol": "file:",
  1573. "username": "",
  1574. "password": "",
  1575. "host": "server",
  1576. "hostname": "server",
  1577. "port": "",
  1578. "pathname": "/file",
  1579. "search": "",
  1580. "hash": ""
  1581. },
  1582. {
  1583. "input": "/\\server/file",
  1584. "base": "file:///tmp/mock/path",
  1585. "href": "file://server/file",
  1586. "protocol": "file:",
  1587. "username": "",
  1588. "password": "",
  1589. "host": "server",
  1590. "hostname": "server",
  1591. "port": "",
  1592. "pathname": "/file",
  1593. "search": "",
  1594. "hash": ""
  1595. },
  1596. {
  1597. "input": "file:///foo/bar.txt",
  1598. "base": "file:///tmp/mock/path",
  1599. "href": "file:///foo/bar.txt",
  1600. "protocol": "file:",
  1601. "username": "",
  1602. "password": "",
  1603. "host": "",
  1604. "hostname": "",
  1605. "port": "",
  1606. "pathname": "/foo/bar.txt",
  1607. "search": "",
  1608. "hash": ""
  1609. },
  1610. {
  1611. "input": "file:///home/me",
  1612. "base": "file:///tmp/mock/path",
  1613. "href": "file:///home/me",
  1614. "protocol": "file:",
  1615. "username": "",
  1616. "password": "",
  1617. "host": "",
  1618. "hostname": "",
  1619. "port": "",
  1620. "pathname": "/home/me",
  1621. "search": "",
  1622. "hash": ""
  1623. },
  1624. {
  1625. "input": "//",
  1626. "base": "file:///tmp/mock/path",
  1627. "href": "file:///",
  1628. "protocol": "file:",
  1629. "username": "",
  1630. "password": "",
  1631. "host": "",
  1632. "hostname": "",
  1633. "port": "",
  1634. "pathname": "/",
  1635. "search": "",
  1636. "hash": ""
  1637. },
  1638. {
  1639. "input": "///",
  1640. "base": "file:///tmp/mock/path",
  1641. "href": "file:///",
  1642. "protocol": "file:",
  1643. "username": "",
  1644. "password": "",
  1645. "host": "",
  1646. "hostname": "",
  1647. "port": "",
  1648. "pathname": "/",
  1649. "search": "",
  1650. "hash": ""
  1651. },
  1652. {
  1653. "input": "///test",
  1654. "base": "file:///tmp/mock/path",
  1655. "href": "file:///test",
  1656. "protocol": "file:",
  1657. "username": "",
  1658. "password": "",
  1659. "host": "",
  1660. "hostname": "",
  1661. "port": "",
  1662. "pathname": "/test",
  1663. "search": "",
  1664. "hash": ""
  1665. },
  1666. {
  1667. "input": "file://test",
  1668. "base": "file:///tmp/mock/path",
  1669. "href": "file://test/",
  1670. "protocol": "file:",
  1671. "username": "",
  1672. "password": "",
  1673. "host": "test",
  1674. "hostname": "test",
  1675. "port": "",
  1676. "pathname": "/",
  1677. "search": "",
  1678. "hash": ""
  1679. },
  1680. {
  1681. "input": "file://localhost",
  1682. "base": "file:///tmp/mock/path",
  1683. "href": "file:///",
  1684. "protocol": "file:",
  1685. "username": "",
  1686. "password": "",
  1687. "host": "",
  1688. "hostname": "",
  1689. "port": "",
  1690. "pathname": "/",
  1691. "search": "",
  1692. "hash": ""
  1693. },
  1694. {
  1695. "input": "file://localhost/",
  1696. "base": "file:///tmp/mock/path",
  1697. "href": "file:///",
  1698. "protocol": "file:",
  1699. "username": "",
  1700. "password": "",
  1701. "host": "",
  1702. "hostname": "",
  1703. "port": "",
  1704. "pathname": "/",
  1705. "search": "",
  1706. "hash": ""
  1707. },
  1708. {
  1709. "input": "file://localhost/test",
  1710. "base": "file:///tmp/mock/path",
  1711. "href": "file:///test",
  1712. "protocol": "file:",
  1713. "username": "",
  1714. "password": "",
  1715. "host": "",
  1716. "hostname": "",
  1717. "port": "",
  1718. "pathname": "/test",
  1719. "search": "",
  1720. "hash": ""
  1721. },
  1722. {
  1723. "input": "test",
  1724. "base": "file:///tmp/mock/path",
  1725. "href": "file:///tmp/mock/test",
  1726. "protocol": "file:",
  1727. "username": "",
  1728. "password": "",
  1729. "host": "",
  1730. "hostname": "",
  1731. "port": "",
  1732. "pathname": "/tmp/mock/test",
  1733. "search": "",
  1734. "hash": ""
  1735. },
  1736. {
  1737. "input": "file:test",
  1738. "base": "file:///tmp/mock/path",
  1739. "href": "file:///tmp/mock/test",
  1740. "protocol": "file:",
  1741. "username": "",
  1742. "password": "",
  1743. "host": "",
  1744. "hostname": "",
  1745. "port": "",
  1746. "pathname": "/tmp/mock/test",
  1747. "search": "",
  1748. "hash": ""
  1749. },
  1750. "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js",
  1751. {
  1752. "input": "http://example.com/././foo",
  1753. "base": "about:blank",
  1754. "href": "http://example.com/foo",
  1755. "origin": "http://example.com",
  1756. "protocol": "http:",
  1757. "username": "",
  1758. "password": "",
  1759. "host": "example.com",
  1760. "hostname": "example.com",
  1761. "port": "",
  1762. "pathname": "/foo",
  1763. "search": "",
  1764. "hash": ""
  1765. },
  1766. {
  1767. "input": "http://example.com/./.foo",
  1768. "base": "about:blank",
  1769. "href": "http://example.com/.foo",
  1770. "origin": "http://example.com",
  1771. "protocol": "http:",
  1772. "username": "",
  1773. "password": "",
  1774. "host": "example.com",
  1775. "hostname": "example.com",
  1776. "port": "",
  1777. "pathname": "/.foo",
  1778. "search": "",
  1779. "hash": ""
  1780. },
  1781. {
  1782. "input": "http://example.com/foo/.",
  1783. "base": "about:blank",
  1784. "href": "http://example.com/foo/",
  1785. "origin": "http://example.com",
  1786. "protocol": "http:",
  1787. "username": "",
  1788. "password": "",
  1789. "host": "example.com",
  1790. "hostname": "example.com",
  1791. "port": "",
  1792. "pathname": "/foo/",
  1793. "search": "",
  1794. "hash": ""
  1795. },
  1796. {
  1797. "input": "http://example.com/foo/./",
  1798. "base": "about:blank",
  1799. "href": "http://example.com/foo/",
  1800. "origin": "http://example.com",
  1801. "protocol": "http:",
  1802. "username": "",
  1803. "password": "",
  1804. "host": "example.com",
  1805. "hostname": "example.com",
  1806. "port": "",
  1807. "pathname": "/foo/",
  1808. "search": "",
  1809. "hash": ""
  1810. },
  1811. {
  1812. "input": "http://example.com/foo/bar/..",
  1813. "base": "about:blank",
  1814. "href": "http://example.com/foo/",
  1815. "origin": "http://example.com",
  1816. "protocol": "http:",
  1817. "username": "",
  1818. "password": "",
  1819. "host": "example.com",
  1820. "hostname": "example.com",
  1821. "port": "",
  1822. "pathname": "/foo/",
  1823. "search": "",
  1824. "hash": ""
  1825. },
  1826. {
  1827. "input": "http://example.com/foo/bar/../",
  1828. "base": "about:blank",
  1829. "href": "http://example.com/foo/",
  1830. "origin": "http://example.com",
  1831. "protocol": "http:",
  1832. "username": "",
  1833. "password": "",
  1834. "host": "example.com",
  1835. "hostname": "example.com",
  1836. "port": "",
  1837. "pathname": "/foo/",
  1838. "search": "",
  1839. "hash": ""
  1840. },
  1841. {
  1842. "input": "http://example.com/foo/..bar",
  1843. "base": "about:blank",
  1844. "href": "http://example.com/foo/..bar",
  1845. "origin": "http://example.com",
  1846. "protocol": "http:",
  1847. "username": "",
  1848. "password": "",
  1849. "host": "example.com",
  1850. "hostname": "example.com",
  1851. "port": "",
  1852. "pathname": "/foo/..bar",
  1853. "search": "",
  1854. "hash": ""
  1855. },
  1856. {
  1857. "input": "http://example.com/foo/bar/../ton",
  1858. "base": "about:blank",
  1859. "href": "http://example.com/foo/ton",
  1860. "origin": "http://example.com",
  1861. "protocol": "http:",
  1862. "username": "",
  1863. "password": "",
  1864. "host": "example.com",
  1865. "hostname": "example.com",
  1866. "port": "",
  1867. "pathname": "/foo/ton",
  1868. "search": "",
  1869. "hash": ""
  1870. },
  1871. {
  1872. "input": "http://example.com/foo/bar/../ton/../../a",
  1873. "base": "about:blank",
  1874. "href": "http://example.com/a",
  1875. "origin": "http://example.com",
  1876. "protocol": "http:",
  1877. "username": "",
  1878. "password": "",
  1879. "host": "example.com",
  1880. "hostname": "example.com",
  1881. "port": "",
  1882. "pathname": "/a",
  1883. "search": "",
  1884. "hash": ""
  1885. },
  1886. {
  1887. "input": "http://example.com/foo/../../..",
  1888. "base": "about:blank",
  1889. "href": "http://example.com/",
  1890. "origin": "http://example.com",
  1891. "protocol": "http:",
  1892. "username": "",
  1893. "password": "",
  1894. "host": "example.com",
  1895. "hostname": "example.com",
  1896. "port": "",
  1897. "pathname": "/",
  1898. "search": "",
  1899. "hash": ""
  1900. },
  1901. {
  1902. "input": "http://example.com/foo/../../../ton",
  1903. "base": "about:blank",
  1904. "href": "http://example.com/ton",
  1905. "origin": "http://example.com",
  1906. "protocol": "http:",
  1907. "username": "",
  1908. "password": "",
  1909. "host": "example.com",
  1910. "hostname": "example.com",
  1911. "port": "",
  1912. "pathname": "/ton",
  1913. "search": "",
  1914. "hash": ""
  1915. },
  1916. {
  1917. "input": "http://example.com/foo/%2e",
  1918. "base": "about:blank",
  1919. "href": "http://example.com/foo/",
  1920. "origin": "http://example.com",
  1921. "protocol": "http:",
  1922. "username": "",
  1923. "password": "",
  1924. "host": "example.com",
  1925. "hostname": "example.com",
  1926. "port": "",
  1927. "pathname": "/foo/",
  1928. "search": "",
  1929. "hash": ""
  1930. },
  1931. {
  1932. "input": "http://example.com/foo/%2e%2",
  1933. "base": "about:blank",
  1934. "href": "http://example.com/foo/%2e%2",
  1935. "origin": "http://example.com",
  1936. "protocol": "http:",
  1937. "username": "",
  1938. "password": "",
  1939. "host": "example.com",
  1940. "hostname": "example.com",
  1941. "port": "",
  1942. "pathname": "/foo/%2e%2",
  1943. "search": "",
  1944. "hash": ""
  1945. },
  1946. {
  1947. "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar",
  1948. "base": "about:blank",
  1949. "href": "http://example.com/%2e.bar",
  1950. "origin": "http://example.com",
  1951. "protocol": "http:",
  1952. "username": "",
  1953. "password": "",
  1954. "host": "example.com",
  1955. "hostname": "example.com",
  1956. "port": "",
  1957. "pathname": "/%2e.bar",
  1958. "search": "",
  1959. "hash": ""
  1960. },
  1961. {
  1962. "input": "http://example.com////../..",
  1963. "base": "about:blank",
  1964. "href": "http://example.com//",
  1965. "origin": "http://example.com",
  1966. "protocol": "http:",
  1967. "username": "",
  1968. "password": "",
  1969. "host": "example.com",
  1970. "hostname": "example.com",
  1971. "port": "",
  1972. "pathname": "//",
  1973. "search": "",
  1974. "hash": ""
  1975. },
  1976. {
  1977. "input": "http://example.com/foo/bar//../..",
  1978. "base": "about:blank",
  1979. "href": "http://example.com/foo/",
  1980. "origin": "http://example.com",
  1981. "protocol": "http:",
  1982. "username": "",
  1983. "password": "",
  1984. "host": "example.com",
  1985. "hostname": "example.com",
  1986. "port": "",
  1987. "pathname": "/foo/",
  1988. "search": "",
  1989. "hash": ""
  1990. },
  1991. {
  1992. "input": "http://example.com/foo/bar//..",
  1993. "base": "about:blank",
  1994. "href": "http://example.com/foo/bar/",
  1995. "origin": "http://example.com",
  1996. "protocol": "http:",
  1997. "username": "",
  1998. "password": "",
  1999. "host": "example.com",
  2000. "hostname": "example.com",
  2001. "port": "",
  2002. "pathname": "/foo/bar/",
  2003. "search": "",
  2004. "hash": ""
  2005. },
  2006. {
  2007. "input": "http://example.com/foo",
  2008. "base": "about:blank",
  2009. "href": "http://example.com/foo",
  2010. "origin": "http://example.com",
  2011. "protocol": "http:",
  2012. "username": "",
  2013. "password": "",
  2014. "host": "example.com",
  2015. "hostname": "example.com",
  2016. "port": "",
  2017. "pathname": "/foo",
  2018. "search": "",
  2019. "hash": ""
  2020. },
  2021. {
  2022. "input": "http://example.com/%20foo",
  2023. "base": "about:blank",
  2024. "href": "http://example.com/%20foo",
  2025. "origin": "http://example.com",
  2026. "protocol": "http:",
  2027. "username": "",
  2028. "password": "",
  2029. "host": "example.com",
  2030. "hostname": "example.com",
  2031. "port": "",
  2032. "pathname": "/%20foo",
  2033. "search": "",
  2034. "hash": ""
  2035. },
  2036. {
  2037. "input": "http://example.com/foo%",
  2038. "base": "about:blank",
  2039. "href": "http://example.com/foo%",
  2040. "origin": "http://example.com",
  2041. "protocol": "http:",
  2042. "username": "",
  2043. "password": "",
  2044. "host": "example.com",
  2045. "hostname": "example.com",
  2046. "port": "",
  2047. "pathname": "/foo%",
  2048. "search": "",
  2049. "hash": ""
  2050. },
  2051. {
  2052. "input": "http://example.com/foo%2",
  2053. "base": "about:blank",
  2054. "href": "http://example.com/foo%2",
  2055. "origin": "http://example.com",
  2056. "protocol": "http:",
  2057. "username": "",
  2058. "password": "",
  2059. "host": "example.com",
  2060. "hostname": "example.com",
  2061. "port": "",
  2062. "pathname": "/foo%2",
  2063. "search": "",
  2064. "hash": ""
  2065. },
  2066. {
  2067. "input": "http://example.com/foo%2zbar",
  2068. "base": "about:blank",
  2069. "href": "http://example.com/foo%2zbar",
  2070. "origin": "http://example.com",
  2071. "protocol": "http:",
  2072. "username": "",
  2073. "password": "",
  2074. "host": "example.com",
  2075. "hostname": "example.com",
  2076. "port": "",
  2077. "pathname": "/foo%2zbar",
  2078. "search": "",
  2079. "hash": ""
  2080. },
  2081. {
  2082. "input": "http://example.com/foo%2©zbar",
  2083. "base": "about:blank",
  2084. "href": "http://example.com/foo%2%C3%82%C2%A9zbar",
  2085. "origin": "http://example.com",
  2086. "protocol": "http:",
  2087. "username": "",
  2088. "password": "",
  2089. "host": "example.com",
  2090. "hostname": "example.com",
  2091. "port": "",
  2092. "pathname": "/foo%2%C3%82%C2%A9zbar",
  2093. "search": "",
  2094. "hash": ""
  2095. },
  2096. {
  2097. "input": "http://example.com/foo%41%7a",
  2098. "base": "about:blank",
  2099. "href": "http://example.com/foo%41%7a",
  2100. "origin": "http://example.com",
  2101. "protocol": "http:",
  2102. "username": "",
  2103. "password": "",
  2104. "host": "example.com",
  2105. "hostname": "example.com",
  2106. "port": "",
  2107. "pathname": "/foo%41%7a",
  2108. "search": "",
  2109. "hash": ""
  2110. },
  2111. {
  2112. "input": "http://example.com/foo\t\u0091%91",
  2113. "base": "about:blank",
  2114. "href": "http://example.com/foo%C2%91%91",
  2115. "origin": "http://example.com",
  2116. "protocol": "http:",
  2117. "username": "",
  2118. "password": "",
  2119. "host": "example.com",
  2120. "hostname": "example.com",
  2121. "port": "",
  2122. "pathname": "/foo%C2%91%91",
  2123. "search": "",
  2124. "hash": ""
  2125. },
  2126. {
  2127. "input": "http://example.com/foo%00%51",
  2128. "base": "about:blank",
  2129. "href": "http://example.com/foo%00%51",
  2130. "origin": "http://example.com",
  2131. "protocol": "http:",
  2132. "username": "",
  2133. "password": "",
  2134. "host": "example.com",
  2135. "hostname": "example.com",
  2136. "port": "",
  2137. "pathname": "/foo%00%51",
  2138. "search": "",
  2139. "hash": ""
  2140. },
  2141. {
  2142. "input": "http://example.com/(%28:%3A%29)",
  2143. "base": "about:blank",
  2144. "href": "http://example.com/(%28:%3A%29)",
  2145. "origin": "http://example.com",
  2146. "protocol": "http:",
  2147. "username": "",
  2148. "password": "",
  2149. "host": "example.com",
  2150. "hostname": "example.com",
  2151. "port": "",
  2152. "pathname": "/(%28:%3A%29)",
  2153. "search": "",
  2154. "hash": ""
  2155. },
  2156. {
  2157. "input": "http://example.com/%3A%3a%3C%3c",
  2158. "base": "about:blank",
  2159. "href": "http://example.com/%3A%3a%3C%3c",
  2160. "origin": "http://example.com",
  2161. "protocol": "http:",
  2162. "username": "",
  2163. "password": "",
  2164. "host": "example.com",
  2165. "hostname": "example.com",
  2166. "port": "",
  2167. "pathname": "/%3A%3a%3C%3c",
  2168. "search": "",
  2169. "hash": ""
  2170. },
  2171. {
  2172. "input": "http://example.com/foo\tbar",
  2173. "base": "about:blank",
  2174. "href": "http://example.com/foobar",
  2175. "origin": "http://example.com",
  2176. "protocol": "http:",
  2177. "username": "",
  2178. "password": "",
  2179. "host": "example.com",
  2180. "hostname": "example.com",
  2181. "port": "",
  2182. "pathname": "/foobar",
  2183. "search": "",
  2184. "hash": ""
  2185. },
  2186. {
  2187. "input": "http://example.com\\\\foo\\\\bar",
  2188. "base": "about:blank",
  2189. "href": "http://example.com//foo//bar",
  2190. "origin": "http://example.com",
  2191. "protocol": "http:",
  2192. "username": "",
  2193. "password": "",
  2194. "host": "example.com",
  2195. "hostname": "example.com",
  2196. "port": "",
  2197. "pathname": "//foo//bar",
  2198. "search": "",
  2199. "hash": ""
  2200. },
  2201. {
  2202. "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
  2203. "base": "about:blank",
  2204. "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
  2205. "origin": "http://example.com",
  2206. "protocol": "http:",
  2207. "username": "",
  2208. "password": "",
  2209. "host": "example.com",
  2210. "hostname": "example.com",
  2211. "port": "",
  2212. "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd",
  2213. "search": "",
  2214. "hash": ""
  2215. },
  2216. {
  2217. "input": "http://example.com/@asdf%40",
  2218. "base": "about:blank",
  2219. "href": "http://example.com/@asdf%40",
  2220. "origin": "http://example.com",
  2221. "protocol": "http:",
  2222. "username": "",
  2223. "password": "",
  2224. "host": "example.com",
  2225. "hostname": "example.com",
  2226. "port": "",
  2227. "pathname": "/@asdf%40",
  2228. "search": "",
  2229. "hash": ""
  2230. },
  2231. {
  2232. "input": "http://example.com/你好你好",
  2233. "base": "about:blank",
  2234. "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
  2235. "origin": "http://example.com",
  2236. "protocol": "http:",
  2237. "username": "",
  2238. "password": "",
  2239. "host": "example.com",
  2240. "hostname": "example.com",
  2241. "port": "",
  2242. "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
  2243. "search": "",
  2244. "hash": ""
  2245. },
  2246. {
  2247. "input": "http://example.com/‥/foo",
  2248. "base": "about:blank",
  2249. "href": "http://example.com/%E2%80%A5/foo",
  2250. "origin": "http://example.com",
  2251. "protocol": "http:",
  2252. "username": "",
  2253. "password": "",
  2254. "host": "example.com",
  2255. "hostname": "example.com",
  2256. "port": "",
  2257. "pathname": "/%E2%80%A5/foo",
  2258. "search": "",
  2259. "hash": ""
  2260. },
  2261. {
  2262. "input": "http://example.com//foo",
  2263. "base": "about:blank",
  2264. "href": "http://example.com/%EF%BB%BF/foo",
  2265. "origin": "http://example.com",
  2266. "protocol": "http:",
  2267. "username": "",
  2268. "password": "",
  2269. "host": "example.com",
  2270. "hostname": "example.com",
  2271. "port": "",
  2272. "pathname": "/%EF%BB%BF/foo",
  2273. "search": "",
  2274. "hash": ""
  2275. },
  2276. {
  2277. "input": "http://example.com/‮/foo/‭/bar",
  2278. "base": "about:blank",
  2279. "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar",
  2280. "origin": "http://example.com",
  2281. "protocol": "http:",
  2282. "username": "",
  2283. "password": "",
  2284. "host": "example.com",
  2285. "hostname": "example.com",
  2286. "port": "",
  2287. "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar",
  2288. "search": "",
  2289. "hash": ""
  2290. },
  2291. "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js",
  2292. {
  2293. "input": "http://www.google.com/foo?bar=baz#",
  2294. "base": "about:blank",
  2295. "href": "http://www.google.com/foo?bar=baz#",
  2296. "origin": "http://www.google.com",
  2297. "protocol": "http:",
  2298. "username": "",
  2299. "password": "",
  2300. "host": "www.google.com",
  2301. "hostname": "www.google.com",
  2302. "port": "",
  2303. "pathname": "/foo",
  2304. "search": "?bar=baz",
  2305. "hash": ""
  2306. },
  2307. {
  2308. "input": "http://www.google.com/foo?bar=baz# »",
  2309. "base": "about:blank",
  2310. "href": "http://www.google.com/foo?bar=baz#%20%C2%BB",
  2311. "origin": "http://www.google.com",
  2312. "protocol": "http:",
  2313. "username": "",
  2314. "password": "",
  2315. "host": "www.google.com",
  2316. "hostname": "www.google.com",
  2317. "port": "",
  2318. "pathname": "/foo",
  2319. "search": "?bar=baz",
  2320. "hash": "#%20%C2%BB"
  2321. },
  2322. {
  2323. "input": "data:test# »",
  2324. "base": "about:blank",
  2325. "href": "data:test#%20%C2%BB",
  2326. "origin": "null",
  2327. "protocol": "data:",
  2328. "username": "",
  2329. "password": "",
  2330. "host": "",
  2331. "hostname": "",
  2332. "port": "",
  2333. "pathname": "test",
  2334. "search": "",
  2335. "hash": "#%20%C2%BB"
  2336. },
  2337. {
  2338. "input": "http://www.google.com",
  2339. "base": "about:blank",
  2340. "href": "http://www.google.com/",
  2341. "origin": "http://www.google.com",
  2342. "protocol": "http:",
  2343. "username": "",
  2344. "password": "",
  2345. "host": "www.google.com",
  2346. "hostname": "www.google.com",
  2347. "port": "",
  2348. "pathname": "/",
  2349. "search": "",
  2350. "hash": ""
  2351. },
  2352. {
  2353. "input": "http://192.0x00A80001",
  2354. "base": "about:blank",
  2355. "href": "http://192.168.0.1/",
  2356. "origin": "http://192.168.0.1",
  2357. "protocol": "http:",
  2358. "username": "",
  2359. "password": "",
  2360. "host": "192.168.0.1",
  2361. "hostname": "192.168.0.1",
  2362. "port": "",
  2363. "pathname": "/",
  2364. "search": "",
  2365. "hash": ""
  2366. },
  2367. {
  2368. "input": "http://www/foo%2Ehtml",
  2369. "base": "about:blank",
  2370. "href": "http://www/foo%2Ehtml",
  2371. "origin": "http://www",
  2372. "protocol": "http:",
  2373. "username": "",
  2374. "password": "",
  2375. "host": "www",
  2376. "hostname": "www",
  2377. "port": "",
  2378. "pathname": "/foo%2Ehtml",
  2379. "search": "",
  2380. "hash": ""
  2381. },
  2382. {
  2383. "input": "http://www/foo/%2E/html",
  2384. "base": "about:blank",
  2385. "href": "http://www/foo/html",
  2386. "origin": "http://www",
  2387. "protocol": "http:",
  2388. "username": "",
  2389. "password": "",
  2390. "host": "www",
  2391. "hostname": "www",
  2392. "port": "",
  2393. "pathname": "/foo/html",
  2394. "search": "",
  2395. "hash": ""
  2396. },
  2397. {
  2398. "input": "http://user:pass@/",
  2399. "base": "about:blank",
  2400. "failure": true
  2401. },
  2402. {
  2403. "input": "http://%25DOMAIN:foobar@foodomain.com/",
  2404. "base": "about:blank",
  2405. "href": "http://%25DOMAIN:foobar@foodomain.com/",
  2406. "origin": "http://foodomain.com",
  2407. "protocol": "http:",
  2408. "username": "%25DOMAIN",
  2409. "password": "foobar",
  2410. "host": "foodomain.com",
  2411. "hostname": "foodomain.com",
  2412. "port": "",
  2413. "pathname": "/",
  2414. "search": "",
  2415. "hash": ""
  2416. },
  2417. {
  2418. "input": "http:\\\\www.google.com\\foo",
  2419. "base": "about:blank",
  2420. "href": "http://www.google.com/foo",
  2421. "origin": "http://www.google.com",
  2422. "protocol": "http:",
  2423. "username": "",
  2424. "password": "",
  2425. "host": "www.google.com",
  2426. "hostname": "www.google.com",
  2427. "port": "",
  2428. "pathname": "/foo",
  2429. "search": "",
  2430. "hash": ""
  2431. },
  2432. {
  2433. "input": "http://foo:80/",
  2434. "base": "about:blank",
  2435. "href": "http://foo/",
  2436. "origin": "http://foo",
  2437. "protocol": "http:",
  2438. "username": "",
  2439. "password": "",
  2440. "host": "foo",
  2441. "hostname": "foo",
  2442. "port": "",
  2443. "pathname": "/",
  2444. "search": "",
  2445. "hash": ""
  2446. },
  2447. {
  2448. "input": "http://foo:81/",
  2449. "base": "about:blank",
  2450. "href": "http://foo:81/",
  2451. "origin": "http://foo:81",
  2452. "protocol": "http:",
  2453. "username": "",
  2454. "password": "",
  2455. "host": "foo:81",
  2456. "hostname": "foo",
  2457. "port": "81",
  2458. "pathname": "/",
  2459. "search": "",
  2460. "hash": ""
  2461. },
  2462. {
  2463. "input": "httpa://foo:80/",
  2464. "base": "about:blank",
  2465. "href": "httpa://foo:80/",
  2466. "origin": "null",
  2467. "protocol": "httpa:",
  2468. "username": "",
  2469. "password": "",
  2470. "host": "foo:80",
  2471. "hostname": "foo",
  2472. "port": "80",
  2473. "pathname": "/",
  2474. "search": "",
  2475. "hash": ""
  2476. },
  2477. {
  2478. "input": "http://foo:-80/",
  2479. "base": "about:blank",
  2480. "failure": true
  2481. },
  2482. {
  2483. "input": "https://foo:443/",
  2484. "base": "about:blank",
  2485. "href": "https://foo/",
  2486. "origin": "https://foo",
  2487. "protocol": "https:",
  2488. "username": "",
  2489. "password": "",
  2490. "host": "foo",
  2491. "hostname": "foo",
  2492. "port": "",
  2493. "pathname": "/",
  2494. "search": "",
  2495. "hash": ""
  2496. },
  2497. {
  2498. "input": "https://foo:80/",
  2499. "base": "about:blank",
  2500. "href": "https://foo:80/",
  2501. "origin": "https://foo:80",
  2502. "protocol": "https:",
  2503. "username": "",
  2504. "password": "",
  2505. "host": "foo:80",
  2506. "hostname": "foo",
  2507. "port": "80",
  2508. "pathname": "/",
  2509. "search": "",
  2510. "hash": ""
  2511. },
  2512. {
  2513. "input": "ftp://foo:21/",
  2514. "base": "about:blank",
  2515. "href": "ftp://foo/",
  2516. "origin": "ftp://foo",
  2517. "protocol": "ftp:",
  2518. "username": "",
  2519. "password": "",
  2520. "host": "foo",
  2521. "hostname": "foo",
  2522. "port": "",
  2523. "pathname": "/",
  2524. "search": "",
  2525. "hash": ""
  2526. },
  2527. {
  2528. "input": "ftp://foo:80/",
  2529. "base": "about:blank",
  2530. "href": "ftp://foo:80/",
  2531. "origin": "ftp://foo:80",
  2532. "protocol": "ftp:",
  2533. "username": "",
  2534. "password": "",
  2535. "host": "foo:80",
  2536. "hostname": "foo",
  2537. "port": "80",
  2538. "pathname": "/",
  2539. "search": "",
  2540. "hash": ""
  2541. },
  2542. {
  2543. "input": "gopher://foo:70/",
  2544. "base": "about:blank",
  2545. "href": "gopher://foo:70/",
  2546. "origin": "null",
  2547. "protocol": "gopher:",
  2548. "username": "",
  2549. "password": "",
  2550. "host": "foo:70",
  2551. "hostname": "foo",
  2552. "port": "70",
  2553. "pathname": "/",
  2554. "search": "",
  2555. "hash": ""
  2556. },
  2557. {
  2558. "input": "gopher://foo:443/",
  2559. "base": "about:blank",
  2560. "href": "gopher://foo:443/",
  2561. "origin": "null",
  2562. "protocol": "gopher:",
  2563. "username": "",
  2564. "password": "",
  2565. "host": "foo:443",
  2566. "hostname": "foo",
  2567. "port": "443",
  2568. "pathname": "/",
  2569. "search": "",
  2570. "hash": ""
  2571. },
  2572. {
  2573. "input": "ws://foo:80/",
  2574. "base": "about:blank",
  2575. "href": "ws://foo/",
  2576. "origin": "ws://foo",
  2577. "protocol": "ws:",
  2578. "username": "",
  2579. "password": "",
  2580. "host": "foo",
  2581. "hostname": "foo",
  2582. "port": "",
  2583. "pathname": "/",
  2584. "search": "",
  2585. "hash": ""
  2586. },
  2587. {
  2588. "input": "ws://foo:81/",
  2589. "base": "about:blank",
  2590. "href": "ws://foo:81/",
  2591. "origin": "ws://foo:81",
  2592. "protocol": "ws:",
  2593. "username": "",
  2594. "password": "",
  2595. "host": "foo:81",
  2596. "hostname": "foo",
  2597. "port": "81",
  2598. "pathname": "/",
  2599. "search": "",
  2600. "hash": ""
  2601. },
  2602. {
  2603. "input": "ws://foo:443/",
  2604. "base": "about:blank",
  2605. "href": "ws://foo:443/",
  2606. "origin": "ws://foo:443",
  2607. "protocol": "ws:",
  2608. "username": "",
  2609. "password": "",
  2610. "host": "foo:443",
  2611. "hostname": "foo",
  2612. "port": "443",
  2613. "pathname": "/",
  2614. "search": "",
  2615. "hash": ""
  2616. },
  2617. {
  2618. "input": "ws://foo:815/",
  2619. "base": "about:blank",
  2620. "href": "ws://foo:815/",
  2621. "origin": "ws://foo:815",
  2622. "protocol": "ws:",
  2623. "username": "",
  2624. "password": "",
  2625. "host": "foo:815",
  2626. "hostname": "foo",
  2627. "port": "815",
  2628. "pathname": "/",
  2629. "search": "",
  2630. "hash": ""
  2631. },
  2632. {
  2633. "input": "wss://foo:80/",
  2634. "base": "about:blank",
  2635. "href": "wss://foo:80/",
  2636. "origin": "wss://foo:80",
  2637. "protocol": "wss:",
  2638. "username": "",
  2639. "password": "",
  2640. "host": "foo:80",
  2641. "hostname": "foo",
  2642. "port": "80",
  2643. "pathname": "/",
  2644. "search": "",
  2645. "hash": ""
  2646. },
  2647. {
  2648. "input": "wss://foo:81/",
  2649. "base": "about:blank",
  2650. "href": "wss://foo:81/",
  2651. "origin": "wss://foo:81",
  2652. "protocol": "wss:",
  2653. "username": "",
  2654. "password": "",
  2655. "host": "foo:81",
  2656. "hostname": "foo",
  2657. "port": "81",
  2658. "pathname": "/",
  2659. "search": "",
  2660. "hash": ""
  2661. },
  2662. {
  2663. "input": "wss://foo:443/",
  2664. "base": "about:blank",
  2665. "href": "wss://foo/",
  2666. "origin": "wss://foo",
  2667. "protocol": "wss:",
  2668. "username": "",
  2669. "password": "",
  2670. "host": "foo",
  2671. "hostname": "foo",
  2672. "port": "",
  2673. "pathname": "/",
  2674. "search": "",
  2675. "hash": ""
  2676. },
  2677. {
  2678. "input": "wss://foo:815/",
  2679. "base": "about:blank",
  2680. "href": "wss://foo:815/",
  2681. "origin": "wss://foo:815",
  2682. "protocol": "wss:",
  2683. "username": "",
  2684. "password": "",
  2685. "host": "foo:815",
  2686. "hostname": "foo",
  2687. "port": "815",
  2688. "pathname": "/",
  2689. "search": "",
  2690. "hash": ""
  2691. },
  2692. {
  2693. "input": "http:/example.com/",
  2694. "base": "about:blank",
  2695. "href": "http://example.com/",
  2696. "origin": "http://example.com",
  2697. "protocol": "http:",
  2698. "username": "",
  2699. "password": "",
  2700. "host": "example.com",
  2701. "hostname": "example.com",
  2702. "port": "",
  2703. "pathname": "/",
  2704. "search": "",
  2705. "hash": ""
  2706. },
  2707. {
  2708. "input": "ftp:/example.com/",
  2709. "base": "about:blank",
  2710. "href": "ftp://example.com/",
  2711. "origin": "ftp://example.com",
  2712. "protocol": "ftp:",
  2713. "username": "",
  2714. "password": "",
  2715. "host": "example.com",
  2716. "hostname": "example.com",
  2717. "port": "",
  2718. "pathname": "/",
  2719. "search": "",
  2720. "hash": ""
  2721. },
  2722. {
  2723. "input": "https:/example.com/",
  2724. "base": "about:blank",
  2725. "href": "https://example.com/",
  2726. "origin": "https://example.com",
  2727. "protocol": "https:",
  2728. "username": "",
  2729. "password": "",
  2730. "host": "example.com",
  2731. "hostname": "example.com",
  2732. "port": "",
  2733. "pathname": "/",
  2734. "search": "",
  2735. "hash": ""
  2736. },
  2737. {
  2738. "input": "madeupscheme:/example.com/",
  2739. "base": "about:blank",
  2740. "href": "madeupscheme:/example.com/",
  2741. "origin": "null",
  2742. "protocol": "madeupscheme:",
  2743. "username": "",
  2744. "password": "",
  2745. "host": "",
  2746. "hostname": "",
  2747. "port": "",
  2748. "pathname": "/example.com/",
  2749. "search": "",
  2750. "hash": ""
  2751. },
  2752. {
  2753. "input": "file:/example.com/",
  2754. "base": "about:blank",
  2755. "href": "file:///example.com/",
  2756. "protocol": "file:",
  2757. "username": "",
  2758. "password": "",
  2759. "host": "",
  2760. "hostname": "",
  2761. "port": "",
  2762. "pathname": "/example.com/",
  2763. "search": "",
  2764. "hash": ""
  2765. },
  2766. {
  2767. "input": "ftps:/example.com/",
  2768. "base": "about:blank",
  2769. "href": "ftps:/example.com/",
  2770. "origin": "null",
  2771. "protocol": "ftps:",
  2772. "username": "",
  2773. "password": "",
  2774. "host": "",
  2775. "hostname": "",
  2776. "port": "",
  2777. "pathname": "/example.com/",
  2778. "search": "",
  2779. "hash": ""
  2780. },
  2781. {
  2782. "input": "gopher:/example.com/",
  2783. "base": "about:blank",
  2784. "href": "gopher:/example.com/",
  2785. "origin": "null",
  2786. "protocol": "gopher:",
  2787. "username": "",
  2788. "password": "",
  2789. "host": "",
  2790. "hostname": "",
  2791. "port": "",
  2792. "pathname": "/example.com/",
  2793. "search": "",
  2794. "hash": ""
  2795. },
  2796. {
  2797. "input": "ws:/example.com/",
  2798. "base": "about:blank",
  2799. "href": "ws://example.com/",
  2800. "origin": "ws://example.com",
  2801. "protocol": "ws:",
  2802. "username": "",
  2803. "password": "",
  2804. "host": "example.com",
  2805. "hostname": "example.com",
  2806. "port": "",
  2807. "pathname": "/",
  2808. "search": "",
  2809. "hash": ""
  2810. },
  2811. {
  2812. "input": "wss:/example.com/",
  2813. "base": "about:blank",
  2814. "href": "wss://example.com/",
  2815. "origin": "wss://example.com",
  2816. "protocol": "wss:",
  2817. "username": "",
  2818. "password": "",
  2819. "host": "example.com",
  2820. "hostname": "example.com",
  2821. "port": "",
  2822. "pathname": "/",
  2823. "search": "",
  2824. "hash": ""
  2825. },
  2826. {
  2827. "input": "data:/example.com/",
  2828. "base": "about:blank",
  2829. "href": "data:/example.com/",
  2830. "origin": "null",
  2831. "protocol": "data:",
  2832. "username": "",
  2833. "password": "",
  2834. "host": "",
  2835. "hostname": "",
  2836. "port": "",
  2837. "pathname": "/example.com/",
  2838. "search": "",
  2839. "hash": ""
  2840. },
  2841. {
  2842. "input": "javascript:/example.com/",
  2843. "base": "about:blank",
  2844. "href": "javascript:/example.com/",
  2845. "origin": "null",
  2846. "protocol": "javascript:",
  2847. "username": "",
  2848. "password": "",
  2849. "host": "",
  2850. "hostname": "",
  2851. "port": "",
  2852. "pathname": "/example.com/",
  2853. "search": "",
  2854. "hash": ""
  2855. },
  2856. {
  2857. "input": "mailto:/example.com/",
  2858. "base": "about:blank",
  2859. "href": "mailto:/example.com/",
  2860. "origin": "null",
  2861. "protocol": "mailto:",
  2862. "username": "",
  2863. "password": "",
  2864. "host": "",
  2865. "hostname": "",
  2866. "port": "",
  2867. "pathname": "/example.com/",
  2868. "search": "",
  2869. "hash": ""
  2870. },
  2871. {
  2872. "input": "http:example.com/",
  2873. "base": "about:blank",
  2874. "href": "http://example.com/",
  2875. "origin": "http://example.com",
  2876. "protocol": "http:",
  2877. "username": "",
  2878. "password": "",
  2879. "host": "example.com",
  2880. "hostname": "example.com",
  2881. "port": "",
  2882. "pathname": "/",
  2883. "search": "",
  2884. "hash": ""
  2885. },
  2886. {
  2887. "input": "ftp:example.com/",
  2888. "base": "about:blank",
  2889. "href": "ftp://example.com/",
  2890. "origin": "ftp://example.com",
  2891. "protocol": "ftp:",
  2892. "username": "",
  2893. "password": "",
  2894. "host": "example.com",
  2895. "hostname": "example.com",
  2896. "port": "",
  2897. "pathname": "/",
  2898. "search": "",
  2899. "hash": ""
  2900. },
  2901. {
  2902. "input": "https:example.com/",
  2903. "base": "about:blank",
  2904. "href": "https://example.com/",
  2905. "origin": "https://example.com",
  2906. "protocol": "https:",
  2907. "username": "",
  2908. "password": "",
  2909. "host": "example.com",
  2910. "hostname": "example.com",
  2911. "port": "",
  2912. "pathname": "/",
  2913. "search": "",
  2914. "hash": ""
  2915. },
  2916. {
  2917. "input": "madeupscheme:example.com/",
  2918. "base": "about:blank",
  2919. "href": "madeupscheme:example.com/",
  2920. "origin": "null",
  2921. "protocol": "madeupscheme:",
  2922. "username": "",
  2923. "password": "",
  2924. "host": "",
  2925. "hostname": "",
  2926. "port": "",
  2927. "pathname": "example.com/",
  2928. "search": "",
  2929. "hash": ""
  2930. },
  2931. {
  2932. "input": "ftps:example.com/",
  2933. "base": "about:blank",
  2934. "href": "ftps:example.com/",
  2935. "origin": "null",
  2936. "protocol": "ftps:",
  2937. "username": "",
  2938. "password": "",
  2939. "host": "",
  2940. "hostname": "",
  2941. "port": "",
  2942. "pathname": "example.com/",
  2943. "search": "",
  2944. "hash": ""
  2945. },
  2946. {
  2947. "input": "gopher:example.com/",
  2948. "base": "about:blank",
  2949. "href": "gopher:example.com/",
  2950. "origin": "null",
  2951. "protocol": "gopher:",
  2952. "username": "",
  2953. "password": "",
  2954. "host": "",
  2955. "hostname": "",
  2956. "port": "",
  2957. "pathname": "example.com/",
  2958. "search": "",
  2959. "hash": ""
  2960. },
  2961. {
  2962. "input": "ws:example.com/",
  2963. "base": "about:blank",
  2964. "href": "ws://example.com/",
  2965. "origin": "ws://example.com",
  2966. "protocol": "ws:",
  2967. "username": "",
  2968. "password": "",
  2969. "host": "example.com",
  2970. "hostname": "example.com",
  2971. "port": "",
  2972. "pathname": "/",
  2973. "search": "",
  2974. "hash": ""
  2975. },
  2976. {
  2977. "input": "wss:example.com/",
  2978. "base": "about:blank",
  2979. "href": "wss://example.com/",
  2980. "origin": "wss://example.com",
  2981. "protocol": "wss:",
  2982. "username": "",
  2983. "password": "",
  2984. "host": "example.com",
  2985. "hostname": "example.com",
  2986. "port": "",
  2987. "pathname": "/",
  2988. "search": "",
  2989. "hash": ""
  2990. },
  2991. {
  2992. "input": "data:example.com/",
  2993. "base": "about:blank",
  2994. "href": "data:example.com/",
  2995. "origin": "null",
  2996. "protocol": "data:",
  2997. "username": "",
  2998. "password": "",
  2999. "host": "",
  3000. "hostname": "",
  3001. "port": "",
  3002. "pathname": "example.com/",
  3003. "search": "",
  3004. "hash": ""
  3005. },
  3006. {
  3007. "input": "javascript:example.com/",
  3008. "base": "about:blank",
  3009. "href": "javascript:example.com/",
  3010. "origin": "null",
  3011. "protocol": "javascript:",
  3012. "username": "",
  3013. "password": "",
  3014. "host": "",
  3015. "hostname": "",
  3016. "port": "",
  3017. "pathname": "example.com/",
  3018. "search": "",
  3019. "hash": ""
  3020. },
  3021. {
  3022. "input": "mailto:example.com/",
  3023. "base": "about:blank",
  3024. "href": "mailto:example.com/",
  3025. "origin": "null",
  3026. "protocol": "mailto:",
  3027. "username": "",
  3028. "password": "",
  3029. "host": "",
  3030. "hostname": "",
  3031. "port": "",
  3032. "pathname": "example.com/",
  3033. "search": "",
  3034. "hash": ""
  3035. },
  3036. "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html",
  3037. {
  3038. "input": "http:@www.example.com",
  3039. "base": "about:blank",
  3040. "href": "http://www.example.com/",
  3041. "origin": "http://www.example.com",
  3042. "protocol": "http:",
  3043. "username": "",
  3044. "password": "",
  3045. "host": "www.example.com",
  3046. "hostname": "www.example.com",
  3047. "port": "",
  3048. "pathname": "/",
  3049. "search": "",
  3050. "hash": ""
  3051. },
  3052. {
  3053. "input": "http:/@www.example.com",
  3054. "base": "about:blank",
  3055. "href": "http://www.example.com/",
  3056. "origin": "http://www.example.com",
  3057. "protocol": "http:",
  3058. "username": "",
  3059. "password": "",
  3060. "host": "www.example.com",
  3061. "hostname": "www.example.com",
  3062. "port": "",
  3063. "pathname": "/",
  3064. "search": "",
  3065. "hash": ""
  3066. },
  3067. {
  3068. "input": "http://@www.example.com",
  3069. "base": "about:blank",
  3070. "href": "http://www.example.com/",
  3071. "origin": "http://www.example.com",
  3072. "protocol": "http:",
  3073. "username": "",
  3074. "password": "",
  3075. "host": "www.example.com",
  3076. "hostname": "www.example.com",
  3077. "port": "",
  3078. "pathname": "/",
  3079. "search": "",
  3080. "hash": ""
  3081. },
  3082. {
  3083. "input": "http:a:b@www.example.com",
  3084. "base": "about:blank",
  3085. "href": "http://a:b@www.example.com/",
  3086. "origin": "http://www.example.com",
  3087. "protocol": "http:",
  3088. "username": "a",
  3089. "password": "b",
  3090. "host": "www.example.com",
  3091. "hostname": "www.example.com",
  3092. "port": "",
  3093. "pathname": "/",
  3094. "search": "",
  3095. "hash": ""
  3096. },
  3097. {
  3098. "input": "http:/a:b@www.example.com",
  3099. "base": "about:blank",
  3100. "href": "http://a:b@www.example.com/",
  3101. "origin": "http://www.example.com",
  3102. "protocol": "http:",
  3103. "username": "a",
  3104. "password": "b",
  3105. "host": "www.example.com",
  3106. "hostname": "www.example.com",
  3107. "port": "",
  3108. "pathname": "/",
  3109. "search": "",
  3110. "hash": ""
  3111. },
  3112. {
  3113. "input": "http://a:b@www.example.com",
  3114. "base": "about:blank",
  3115. "href": "http://a:b@www.example.com/",
  3116. "origin": "http://www.example.com",
  3117. "protocol": "http:",
  3118. "username": "a",
  3119. "password": "b",
  3120. "host": "www.example.com",
  3121. "hostname": "www.example.com",
  3122. "port": "",
  3123. "pathname": "/",
  3124. "search": "",
  3125. "hash": ""
  3126. },
  3127. {
  3128. "input": "http://@pple.com",
  3129. "base": "about:blank",
  3130. "href": "http://pple.com/",
  3131. "origin": "http://pple.com",
  3132. "protocol": "http:",
  3133. "username": "",
  3134. "password": "",
  3135. "host": "pple.com",
  3136. "hostname": "pple.com",
  3137. "port": "",
  3138. "pathname": "/",
  3139. "search": "",
  3140. "hash": ""
  3141. },
  3142. {
  3143. "input": "http::b@www.example.com",
  3144. "base": "about:blank",
  3145. "href": "http://:b@www.example.com/",
  3146. "origin": "http://www.example.com",
  3147. "protocol": "http:",
  3148. "username": "",
  3149. "password": "b",
  3150. "host": "www.example.com",
  3151. "hostname": "www.example.com",
  3152. "port": "",
  3153. "pathname": "/",
  3154. "search": "",
  3155. "hash": ""
  3156. },
  3157. {
  3158. "input": "http:/:b@www.example.com",
  3159. "base": "about:blank",
  3160. "href": "http://:b@www.example.com/",
  3161. "origin": "http://www.example.com",
  3162. "protocol": "http:",
  3163. "username": "",
  3164. "password": "b",
  3165. "host": "www.example.com",
  3166. "hostname": "www.example.com",
  3167. "port": "",
  3168. "pathname": "/",
  3169. "search": "",
  3170. "hash": ""
  3171. },
  3172. {
  3173. "input": "http://:b@www.example.com",
  3174. "base": "about:blank",
  3175. "href": "http://:b@www.example.com/",
  3176. "origin": "http://www.example.com",
  3177. "protocol": "http:",
  3178. "username": "",
  3179. "password": "b",
  3180. "host": "www.example.com",
  3181. "hostname": "www.example.com",
  3182. "port": "",
  3183. "pathname": "/",
  3184. "search": "",
  3185. "hash": ""
  3186. },
  3187. {
  3188. "input": "http:/:@/www.example.com",
  3189. "base": "about:blank",
  3190. "failure": true,
  3191. "inputCanBeRelative": true
  3192. },
  3193. {
  3194. "input": "http://user@/www.example.com",
  3195. "base": "about:blank",
  3196. "failure": true
  3197. },
  3198. {
  3199. "input": "http:@/www.example.com",
  3200. "base": "about:blank",
  3201. "failure": true,
  3202. "inputCanBeRelative": true
  3203. },
  3204. {
  3205. "input": "http:/@/www.example.com",
  3206. "base": "about:blank",
  3207. "failure": true,
  3208. "inputCanBeRelative": true
  3209. },
  3210. {
  3211. "input": "http://@/www.example.com",
  3212. "base": "about:blank",
  3213. "failure": true
  3214. },
  3215. {
  3216. "input": "https:@/www.example.com",
  3217. "base": "about:blank",
  3218. "failure": true,
  3219. "inputCanBeRelative": true
  3220. },
  3221. {
  3222. "input": "http:a:b@/www.example.com",
  3223. "base": "about:blank",
  3224. "failure": true,
  3225. "inputCanBeRelative": true
  3226. },
  3227. {
  3228. "input": "http:/a:b@/www.example.com",
  3229. "base": "about:blank",
  3230. "failure": true,
  3231. "inputCanBeRelative": true
  3232. },
  3233. {
  3234. "input": "http://a:b@/www.example.com",
  3235. "base": "about:blank",
  3236. "failure": true
  3237. },
  3238. {
  3239. "input": "http::@/www.example.com",
  3240. "base": "about:blank",
  3241. "failure": true,
  3242. "inputCanBeRelative": true
  3243. },
  3244. {
  3245. "input": "http:a:@www.example.com",
  3246. "base": "about:blank",
  3247. "href": "http://a@www.example.com/",
  3248. "origin": "http://www.example.com",
  3249. "protocol": "http:",
  3250. "username": "a",
  3251. "password": "",
  3252. "host": "www.example.com",
  3253. "hostname": "www.example.com",
  3254. "port": "",
  3255. "pathname": "/",
  3256. "search": "",
  3257. "hash": ""
  3258. },
  3259. {
  3260. "input": "http:/a:@www.example.com",
  3261. "base": "about:blank",
  3262. "href": "http://a@www.example.com/",
  3263. "origin": "http://www.example.com",
  3264. "protocol": "http:",
  3265. "username": "a",
  3266. "password": "",
  3267. "host": "www.example.com",
  3268. "hostname": "www.example.com",
  3269. "port": "",
  3270. "pathname": "/",
  3271. "search": "",
  3272. "hash": ""
  3273. },
  3274. {
  3275. "input": "http://a:@www.example.com",
  3276. "base": "about:blank",
  3277. "href": "http://a@www.example.com/",
  3278. "origin": "http://www.example.com",
  3279. "protocol": "http:",
  3280. "username": "a",
  3281. "password": "",
  3282. "host": "www.example.com",
  3283. "hostname": "www.example.com",
  3284. "port": "",
  3285. "pathname": "/",
  3286. "search": "",
  3287. "hash": ""
  3288. },
  3289. {
  3290. "input": "http://www.@pple.com",
  3291. "base": "about:blank",
  3292. "href": "http://www.@pple.com/",
  3293. "origin": "http://pple.com",
  3294. "protocol": "http:",
  3295. "username": "www.",
  3296. "password": "",
  3297. "host": "pple.com",
  3298. "hostname": "pple.com",
  3299. "port": "",
  3300. "pathname": "/",
  3301. "search": "",
  3302. "hash": ""
  3303. },
  3304. {
  3305. "input": "http:@:www.example.com",
  3306. "base": "about:blank",
  3307. "failure": true,
  3308. "inputCanBeRelative": true
  3309. },
  3310. {
  3311. "input": "http:/@:www.example.com",
  3312. "base": "about:blank",
  3313. "failure": true,
  3314. "inputCanBeRelative": true
  3315. },
  3316. {
  3317. "input": "http://@:www.example.com",
  3318. "base": "about:blank",
  3319. "failure": true
  3320. },
  3321. {
  3322. "input": "http://:@www.example.com",
  3323. "base": "about:blank",
  3324. "href": "http://www.example.com/",
  3325. "origin": "http://www.example.com",
  3326. "protocol": "http:",
  3327. "username": "",
  3328. "password": "",
  3329. "host": "www.example.com",
  3330. "hostname": "www.example.com",
  3331. "port": "",
  3332. "pathname": "/",
  3333. "search": "",
  3334. "hash": ""
  3335. },
  3336. "# Others",
  3337. {
  3338. "input": "/",
  3339. "base": "http://www.example.com/test",
  3340. "href": "http://www.example.com/",
  3341. "origin": "http://www.example.com",
  3342. "protocol": "http:",
  3343. "username": "",
  3344. "password": "",
  3345. "host": "www.example.com",
  3346. "hostname": "www.example.com",
  3347. "port": "",
  3348. "pathname": "/",
  3349. "search": "",
  3350. "hash": ""
  3351. },
  3352. {
  3353. "input": "/test.txt",
  3354. "base": "http://www.example.com/test",
  3355. "href": "http://www.example.com/test.txt",
  3356. "origin": "http://www.example.com",
  3357. "protocol": "http:",
  3358. "username": "",
  3359. "password": "",
  3360. "host": "www.example.com",
  3361. "hostname": "www.example.com",
  3362. "port": "",
  3363. "pathname": "/test.txt",
  3364. "search": "",
  3365. "hash": ""
  3366. },
  3367. {
  3368. "input": ".",
  3369. "base": "http://www.example.com/test",
  3370. "href": "http://www.example.com/",
  3371. "origin": "http://www.example.com",
  3372. "protocol": "http:",
  3373. "username": "",
  3374. "password": "",
  3375. "host": "www.example.com",
  3376. "hostname": "www.example.com",
  3377. "port": "",
  3378. "pathname": "/",
  3379. "search": "",
  3380. "hash": ""
  3381. },
  3382. {
  3383. "input": "..",
  3384. "base": "http://www.example.com/test",
  3385. "href": "http://www.example.com/",
  3386. "origin": "http://www.example.com",
  3387. "protocol": "http:",
  3388. "username": "",
  3389. "password": "",
  3390. "host": "www.example.com",
  3391. "hostname": "www.example.com",
  3392. "port": "",
  3393. "pathname": "/",
  3394. "search": "",
  3395. "hash": ""
  3396. },
  3397. {
  3398. "input": "test.txt",
  3399. "base": "http://www.example.com/test",
  3400. "href": "http://www.example.com/test.txt",
  3401. "origin": "http://www.example.com",
  3402. "protocol": "http:",
  3403. "username": "",
  3404. "password": "",
  3405. "host": "www.example.com",
  3406. "hostname": "www.example.com",
  3407. "port": "",
  3408. "pathname": "/test.txt",
  3409. "search": "",
  3410. "hash": ""
  3411. },
  3412. {
  3413. "input": "./test.txt",
  3414. "base": "http://www.example.com/test",
  3415. "href": "http://www.example.com/test.txt",
  3416. "origin": "http://www.example.com",
  3417. "protocol": "http:",
  3418. "username": "",
  3419. "password": "",
  3420. "host": "www.example.com",
  3421. "hostname": "www.example.com",
  3422. "port": "",
  3423. "pathname": "/test.txt",
  3424. "search": "",
  3425. "hash": ""
  3426. },
  3427. {
  3428. "input": "../test.txt",
  3429. "base": "http://www.example.com/test",
  3430. "href": "http://www.example.com/test.txt",
  3431. "origin": "http://www.example.com",
  3432. "protocol": "http:",
  3433. "username": "",
  3434. "password": "",
  3435. "host": "www.example.com",
  3436. "hostname": "www.example.com",
  3437. "port": "",
  3438. "pathname": "/test.txt",
  3439. "search": "",
  3440. "hash": ""
  3441. },
  3442. {
  3443. "input": "../aaa/test.txt",
  3444. "base": "http://www.example.com/test",
  3445. "href": "http://www.example.com/aaa/test.txt",
  3446. "origin": "http://www.example.com",
  3447. "protocol": "http:",
  3448. "username": "",
  3449. "password": "",
  3450. "host": "www.example.com",
  3451. "hostname": "www.example.com",
  3452. "port": "",
  3453. "pathname": "/aaa/test.txt",
  3454. "search": "",
  3455. "hash": ""
  3456. },
  3457. {
  3458. "input": "../../test.txt",
  3459. "base": "http://www.example.com/test",
  3460. "href": "http://www.example.com/test.txt",
  3461. "origin": "http://www.example.com",
  3462. "protocol": "http:",
  3463. "username": "",
  3464. "password": "",
  3465. "host": "www.example.com",
  3466. "hostname": "www.example.com",
  3467. "port": "",
  3468. "pathname": "/test.txt",
  3469. "search": "",
  3470. "hash": ""
  3471. },
  3472. {
  3473. "input": "中/test.txt",
  3474. "base": "http://www.example.com/test",
  3475. "href": "http://www.example.com/%E4%B8%AD/test.txt",
  3476. "origin": "http://www.example.com",
  3477. "protocol": "http:",
  3478. "username": "",
  3479. "password": "",
  3480. "host": "www.example.com",
  3481. "hostname": "www.example.com",
  3482. "port": "",
  3483. "pathname": "/%E4%B8%AD/test.txt",
  3484. "search": "",
  3485. "hash": ""
  3486. },
  3487. {
  3488. "input": "http://www.example2.com",
  3489. "base": "http://www.example.com/test",
  3490. "href": "http://www.example2.com/",
  3491. "origin": "http://www.example2.com",
  3492. "protocol": "http:",
  3493. "username": "",
  3494. "password": "",
  3495. "host": "www.example2.com",
  3496. "hostname": "www.example2.com",
  3497. "port": "",
  3498. "pathname": "/",
  3499. "search": "",
  3500. "hash": ""
  3501. },
  3502. {
  3503. "input": "//www.example2.com",
  3504. "base": "http://www.example.com/test",
  3505. "href": "http://www.example2.com/",
  3506. "origin": "http://www.example2.com",
  3507. "protocol": "http:",
  3508. "username": "",
  3509. "password": "",
  3510. "host": "www.example2.com",
  3511. "hostname": "www.example2.com",
  3512. "port": "",
  3513. "pathname": "/",
  3514. "search": "",
  3515. "hash": ""
  3516. },
  3517. {
  3518. "input": "file:...",
  3519. "base": "http://www.example.com/test",
  3520. "href": "file:///...",
  3521. "protocol": "file:",
  3522. "username": "",
  3523. "password": "",
  3524. "host": "",
  3525. "hostname": "",
  3526. "port": "",
  3527. "pathname": "/...",
  3528. "search": "",
  3529. "hash": ""
  3530. },
  3531. {
  3532. "input": "file:..",
  3533. "base": "http://www.example.com/test",
  3534. "href": "file:///",
  3535. "protocol": "file:",
  3536. "username": "",
  3537. "password": "",
  3538. "host": "",
  3539. "hostname": "",
  3540. "port": "",
  3541. "pathname": "/",
  3542. "search": "",
  3543. "hash": ""
  3544. },
  3545. {
  3546. "input": "file:a",
  3547. "base": "http://www.example.com/test",
  3548. "href": "file:///a",
  3549. "protocol": "file:",
  3550. "username": "",
  3551. "password": "",
  3552. "host": "",
  3553. "hostname": "",
  3554. "port": "",
  3555. "pathname": "/a",
  3556. "search": "",
  3557. "hash": ""
  3558. },
  3559. "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html",
  3560. "Basic canonicalization, uppercase should be converted to lowercase",
  3561. {
  3562. "input": "http://ExAmPlE.CoM",
  3563. "base": "http://other.com/",
  3564. "href": "http://example.com/",
  3565. "origin": "http://example.com",
  3566. "protocol": "http:",
  3567. "username": "",
  3568. "password": "",
  3569. "host": "example.com",
  3570. "hostname": "example.com",
  3571. "port": "",
  3572. "pathname": "/",
  3573. "search": "",
  3574. "hash": ""
  3575. },
  3576. {
  3577. "input": "http://example example.com",
  3578. "base": "http://other.com/",
  3579. "failure": true
  3580. },
  3581. {
  3582. "input": "http://Goo%20 goo%7C|.com",
  3583. "base": "http://other.com/",
  3584. "failure": true
  3585. },
  3586. {
  3587. "input": "http://[]",
  3588. "base": "http://other.com/",
  3589. "failure": true
  3590. },
  3591. {
  3592. "input": "http://[:]",
  3593. "base": "http://other.com/",
  3594. "failure": true
  3595. },
  3596. "U+3000 is mapped to U+0020 (space) which is disallowed",
  3597. {
  3598. "input": "http://GOO\u00a0\u3000goo.com",
  3599. "base": "http://other.com/",
  3600. "failure": true
  3601. },
  3602. "Other types of space (no-break, zero-width, zero-width-no-break) are name-prepped away to nothing. U+200B, U+2060, and U+FEFF, are ignored",
  3603. {
  3604. "input": "http://GOO\u200b\u2060\ufeffgoo.com",
  3605. "base": "http://other.com/",
  3606. "href": "http://googoo.com/",
  3607. "origin": "http://googoo.com",
  3608. "protocol": "http:",
  3609. "username": "",
  3610. "password": "",
  3611. "host": "googoo.com",
  3612. "hostname": "googoo.com",
  3613. "port": "",
  3614. "pathname": "/",
  3615. "search": "",
  3616. "hash": ""
  3617. },
  3618. "Leading and trailing C0 control or space",
  3619. {
  3620. "input": "\u0000\u001b\u0004\u0012 http://example.com/\u001f \u000d ",
  3621. "base": "about:blank",
  3622. "href": "http://example.com/",
  3623. "origin": "http://example.com",
  3624. "protocol": "http:",
  3625. "username": "",
  3626. "password": "",
  3627. "host": "example.com",
  3628. "hostname": "example.com",
  3629. "port": "",
  3630. "pathname": "/",
  3631. "search": "",
  3632. "hash": ""
  3633. },
  3634. "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)",
  3635. {
  3636. "input": "http://www.foo。bar.com",
  3637. "base": "http://other.com/",
  3638. "href": "http://www.foo.bar.com/",
  3639. "origin": "http://www.foo.bar.com",
  3640. "protocol": "http:",
  3641. "username": "",
  3642. "password": "",
  3643. "host": "www.foo.bar.com",
  3644. "hostname": "www.foo.bar.com",
  3645. "port": "",
  3646. "pathname": "/",
  3647. "search": "",
  3648. "hash": ""
  3649. },
  3650. "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0",
  3651. {
  3652. "input": "http://\ufdd0zyx.com",
  3653. "base": "http://other.com/",
  3654. "failure": true
  3655. },
  3656. "This is the same as previous but escaped",
  3657. {
  3658. "input": "http://%ef%b7%90zyx.com",
  3659. "base": "http://other.com/",
  3660. "failure": true
  3661. },
  3662. "U+FFFD",
  3663. {
  3664. "input": "https://\ufffd",
  3665. "base": "about:blank",
  3666. "failure": true
  3667. },
  3668. {
  3669. "input": "https://%EF%BF%BD",
  3670. "base": "about:blank",
  3671. "failure": true
  3672. },
  3673. {
  3674. "input": "https://x/\ufffd?\ufffd#\ufffd",
  3675. "base": "about:blank",
  3676. "href": "https://x/%EF%BF%BD?%EF%BF%BD#%EF%BF%BD",
  3677. "origin": "https://x",
  3678. "protocol": "https:",
  3679. "username": "",
  3680. "password": "",
  3681. "host": "x",
  3682. "hostname": "x",
  3683. "port": "",
  3684. "pathname": "/%EF%BF%BD",
  3685. "search": "?%EF%BF%BD",
  3686. "hash": "#%EF%BF%BD"
  3687. },
  3688. "Domain is ASCII, but a label is invalid IDNA",
  3689. {
  3690. "input": "http://a.b.c.xn--pokxncvks",
  3691. "base": "about:blank",
  3692. "failure": true
  3693. },
  3694. {
  3695. "input": "http://10.0.0.xn--pokxncvks",
  3696. "base": "about:blank",
  3697. "failure": true
  3698. },
  3699. "IDNA labels should be matched case-insensitively",
  3700. {
  3701. "input": "http://a.b.c.XN--pokxncvks",
  3702. "base": "about:blank",
  3703. "failure": true
  3704. },
  3705. {
  3706. "input": "http://a.b.c.Xn--pokxncvks",
  3707. "base": "about:blank",
  3708. "failure": true
  3709. },
  3710. {
  3711. "input": "http://10.0.0.XN--pokxncvks",
  3712. "base": "about:blank",
  3713. "failure": true
  3714. },
  3715. {
  3716. "input": "http://10.0.0.xN--pokxncvks",
  3717. "base": "about:blank",
  3718. "failure": true
  3719. },
  3720. "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.",
  3721. {
  3722. "input": "http://Go.com",
  3723. "base": "http://other.com/",
  3724. "href": "http://go.com/",
  3725. "origin": "http://go.com",
  3726. "protocol": "http:",
  3727. "username": "",
  3728. "password": "",
  3729. "host": "go.com",
  3730. "hostname": "go.com",
  3731. "port": "",
  3732. "pathname": "/",
  3733. "search": "",
  3734. "hash": ""
  3735. },
  3736. "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257",
  3737. {
  3738. "input": "http://%41.com",
  3739. "base": "http://other.com/",
  3740. "failure": true
  3741. },
  3742. {
  3743. "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com",
  3744. "base": "http://other.com/",
  3745. "failure": true
  3746. },
  3747. "...%00 in fullwidth should fail (also as escaped UTF-8 input)",
  3748. {
  3749. "input": "http://%00.com",
  3750. "base": "http://other.com/",
  3751. "failure": true
  3752. },
  3753. {
  3754. "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com",
  3755. "base": "http://other.com/",
  3756. "failure": true
  3757. },
  3758. "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN",
  3759. {
  3760. "input": "http://你好你好",
  3761. "base": "http://other.com/",
  3762. "href": "http://xn--6qqa088eba/",
  3763. "origin": "http://xn--6qqa088eba",
  3764. "protocol": "http:",
  3765. "username": "",
  3766. "password": "",
  3767. "host": "xn--6qqa088eba",
  3768. "hostname": "xn--6qqa088eba",
  3769. "port": "",
  3770. "pathname": "/",
  3771. "search": "",
  3772. "hash": ""
  3773. },
  3774. {
  3775. "input": "https://faß.ExAmPlE/",
  3776. "base": "about:blank",
  3777. "href": "https://xn--fa-hia.example/",
  3778. "origin": "https://xn--fa-hia.example",
  3779. "protocol": "https:",
  3780. "username": "",
  3781. "password": "",
  3782. "host": "xn--fa-hia.example",
  3783. "hostname": "xn--fa-hia.example",
  3784. "port": "",
  3785. "pathname": "/",
  3786. "search": "",
  3787. "hash": ""
  3788. },
  3789. {
  3790. "input": "sc://faß.ExAmPlE/",
  3791. "base": "about:blank",
  3792. "href": "sc://fa%C3%9F.ExAmPlE/",
  3793. "origin": "null",
  3794. "protocol": "sc:",
  3795. "username": "",
  3796. "password": "",
  3797. "host": "fa%C3%9F.ExAmPlE",
  3798. "hostname": "fa%C3%9F.ExAmPlE",
  3799. "port": "",
  3800. "pathname": "/",
  3801. "search": "",
  3802. "hash": ""
  3803. },
  3804. "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191",
  3805. {
  3806. "input": "http://%zz%66%a.com",
  3807. "base": "http://other.com/",
  3808. "failure": true
  3809. },
  3810. "If we get an invalid character that has been escaped.",
  3811. {
  3812. "input": "http://%25",
  3813. "base": "http://other.com/",
  3814. "failure": true
  3815. },
  3816. {
  3817. "input": "http://hello%00",
  3818. "base": "http://other.com/",
  3819. "failure": true
  3820. },
  3821. "Escaped numbers should be treated like IP addresses if they are.",
  3822. {
  3823. "input": "http://%30%78%63%30%2e%30%32%35%30.01",
  3824. "base": "http://other.com/",
  3825. "href": "http://192.168.0.1/",
  3826. "origin": "http://192.168.0.1",
  3827. "protocol": "http:",
  3828. "username": "",
  3829. "password": "",
  3830. "host": "192.168.0.1",
  3831. "hostname": "192.168.0.1",
  3832. "port": "",
  3833. "pathname": "/",
  3834. "search": "",
  3835. "hash": ""
  3836. },
  3837. {
  3838. "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e",
  3839. "base": "http://other.com/",
  3840. "href": "http://192.168.0.1/",
  3841. "origin": "http://192.168.0.1",
  3842. "protocol": "http:",
  3843. "username": "",
  3844. "password": "",
  3845. "host": "192.168.0.1",
  3846. "hostname": "192.168.0.1",
  3847. "port": "",
  3848. "pathname": "/",
  3849. "search": "",
  3850. "hash": ""
  3851. },
  3852. {
  3853. "input": "http://192.168.0.257",
  3854. "base": "http://other.com/",
  3855. "failure": true
  3856. },
  3857. "Invalid escaping in hosts causes failure",
  3858. {
  3859. "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01",
  3860. "base": "http://other.com/",
  3861. "failure": true
  3862. },
  3863. "A space in a host causes failure",
  3864. {
  3865. "input": "http://192.168.0.1 hello",
  3866. "base": "http://other.com/",
  3867. "failure": true
  3868. },
  3869. {
  3870. "input": "https://x x:12",
  3871. "base": "about:blank",
  3872. "failure": true
  3873. },
  3874. "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP",
  3875. {
  3876. "input": "http://0Xc0.0250.01",
  3877. "base": "http://other.com/",
  3878. "href": "http://192.168.0.1/",
  3879. "origin": "http://192.168.0.1",
  3880. "protocol": "http:",
  3881. "username": "",
  3882. "password": "",
  3883. "host": "192.168.0.1",
  3884. "hostname": "192.168.0.1",
  3885. "port": "",
  3886. "pathname": "/",
  3887. "search": "",
  3888. "hash": ""
  3889. },
  3890. "Domains with empty labels",
  3891. {
  3892. "input": "http://./",
  3893. "base": "about:blank",
  3894. "href": "http://./",
  3895. "origin": "http://.",
  3896. "protocol": "http:",
  3897. "username": "",
  3898. "password": "",
  3899. "host": ".",
  3900. "hostname": ".",
  3901. "port": "",
  3902. "pathname": "/",
  3903. "search": "",
  3904. "hash": ""
  3905. },
  3906. {
  3907. "input": "http://../",
  3908. "base": "about:blank",
  3909. "href": "http://../",
  3910. "origin": "http://..",
  3911. "protocol": "http:",
  3912. "username": "",
  3913. "password": "",
  3914. "host": "..",
  3915. "hostname": "..",
  3916. "port": "",
  3917. "pathname": "/",
  3918. "search": "",
  3919. "hash": ""
  3920. },
  3921. "Broken IPv6",
  3922. {
  3923. "input": "http://[www.google.com]/",
  3924. "base": "about:blank",
  3925. "failure": true
  3926. },
  3927. {
  3928. "input": "http://[google.com]",
  3929. "base": "http://other.com/",
  3930. "failure": true
  3931. },
  3932. {
  3933. "input": "http://[::1.2.3.4x]",
  3934. "base": "http://other.com/",
  3935. "failure": true
  3936. },
  3937. {
  3938. "input": "http://[::1.2.3.]",
  3939. "base": "http://other.com/",
  3940. "failure": true
  3941. },
  3942. {
  3943. "input": "http://[::1.2.]",
  3944. "base": "http://other.com/",
  3945. "failure": true
  3946. },
  3947. {
  3948. "input": "http://[::1.]",
  3949. "base": "http://other.com/",
  3950. "failure": true
  3951. },
  3952. "Misc Unicode",
  3953. {
  3954. "input": "http://foo:💩@example.com/bar",
  3955. "base": "http://other.com/",
  3956. "href": "http://foo:%F0%9F%92%A9@example.com/bar",
  3957. "origin": "http://example.com",
  3958. "protocol": "http:",
  3959. "username": "foo",
  3960. "password": "%F0%9F%92%A9",
  3961. "host": "example.com",
  3962. "hostname": "example.com",
  3963. "port": "",
  3964. "pathname": "/bar",
  3965. "search": "",
  3966. "hash": ""
  3967. },
  3968. "# resolving a fragment against any scheme succeeds",
  3969. {
  3970. "input": "#",
  3971. "base": "test:test",
  3972. "href": "test:test#",
  3973. "origin": "null",
  3974. "protocol": "test:",
  3975. "username": "",
  3976. "password": "",
  3977. "host": "",
  3978. "hostname": "",
  3979. "port": "",
  3980. "pathname": "test",
  3981. "search": "",
  3982. "hash": ""
  3983. },
  3984. {
  3985. "input": "#x",
  3986. "base": "mailto:x@x.com",
  3987. "href": "mailto:x@x.com#x",
  3988. "origin": "null",
  3989. "protocol": "mailto:",
  3990. "username": "",
  3991. "password": "",
  3992. "host": "",
  3993. "hostname": "",
  3994. "port": "",
  3995. "pathname": "x@x.com",
  3996. "search": "",
  3997. "hash": "#x"
  3998. },
  3999. {
  4000. "input": "#x",
  4001. "base": "data:,",
  4002. "href": "data:,#x",
  4003. "origin": "null",
  4004. "protocol": "data:",
  4005. "username": "",
  4006. "password": "",
  4007. "host": "",
  4008. "hostname": "",
  4009. "port": "",
  4010. "pathname": ",",
  4011. "search": "",
  4012. "hash": "#x"
  4013. },
  4014. {
  4015. "input": "#x",
  4016. "base": "about:blank",
  4017. "href": "about:blank#x",
  4018. "origin": "null",
  4019. "protocol": "about:",
  4020. "username": "",
  4021. "password": "",
  4022. "host": "",
  4023. "hostname": "",
  4024. "port": "",
  4025. "pathname": "blank",
  4026. "search": "",
  4027. "hash": "#x"
  4028. },
  4029. {
  4030. "input": "#",
  4031. "base": "test:test?test",
  4032. "href": "test:test?test#",
  4033. "origin": "null",
  4034. "protocol": "test:",
  4035. "username": "",
  4036. "password": "",
  4037. "host": "",
  4038. "hostname": "",
  4039. "port": "",
  4040. "pathname": "test",
  4041. "search": "?test",
  4042. "hash": ""
  4043. },
  4044. "# multiple @ in authority state",
  4045. {
  4046. "input": "https://@test@test@example:800/",
  4047. "base": "http://doesnotmatter/",
  4048. "href": "https://%40test%40test@example:800/",
  4049. "origin": "https://example:800",
  4050. "protocol": "https:",
  4051. "username": "%40test%40test",
  4052. "password": "",
  4053. "host": "example:800",
  4054. "hostname": "example",
  4055. "port": "800",
  4056. "pathname": "/",
  4057. "search": "",
  4058. "hash": ""
  4059. },
  4060. {
  4061. "input": "https://@@@example",
  4062. "base": "http://doesnotmatter/",
  4063. "href": "https://%40%40@example/",
  4064. "origin": "https://example",
  4065. "protocol": "https:",
  4066. "username": "%40%40",
  4067. "password": "",
  4068. "host": "example",
  4069. "hostname": "example",
  4070. "port": "",
  4071. "pathname": "/",
  4072. "search": "",
  4073. "hash": ""
  4074. },
  4075. "non-az-09 characters",
  4076. {
  4077. "input": "http://`{}:`{}@h/`{}?`{}",
  4078. "base": "http://doesnotmatter/",
  4079. "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}",
  4080. "origin": "http://h",
  4081. "protocol": "http:",
  4082. "username": "%60%7B%7D",
  4083. "password": "%60%7B%7D",
  4084. "host": "h",
  4085. "hostname": "h",
  4086. "port": "",
  4087. "pathname": "/%60%7B%7D",
  4088. "search": "?`{}",
  4089. "hash": ""
  4090. },
  4091. "byte is ' and url is special",
  4092. {
  4093. "input": "http://host/?'",
  4094. "base": "about:blank",
  4095. "href": "http://host/?%27",
  4096. "origin": "http://host",
  4097. "protocol": "http:",
  4098. "username": "",
  4099. "password": "",
  4100. "host": "host",
  4101. "hostname": "host",
  4102. "port": "",
  4103. "pathname": "/",
  4104. "search": "?%27",
  4105. "hash": ""
  4106. },
  4107. {
  4108. "input": "notspecial://host/?'",
  4109. "base": "about:blank",
  4110. "href": "notspecial://host/?'",
  4111. "origin": "null",
  4112. "protocol": "notspecial:",
  4113. "username": "",
  4114. "password": "",
  4115. "host": "host",
  4116. "hostname": "host",
  4117. "port": "",
  4118. "pathname": "/",
  4119. "search": "?'",
  4120. "hash": ""
  4121. },
  4122. "# Credentials in base",
  4123. {
  4124. "input": "/some/path",
  4125. "base": "http://user@example.org/smth",
  4126. "href": "http://user@example.org/some/path",
  4127. "origin": "http://example.org",
  4128. "protocol": "http:",
  4129. "username": "user",
  4130. "password": "",
  4131. "host": "example.org",
  4132. "hostname": "example.org",
  4133. "port": "",
  4134. "pathname": "/some/path",
  4135. "search": "",
  4136. "hash": ""
  4137. },
  4138. {
  4139. "input": "",
  4140. "base": "http://user:pass@example.org:21/smth",
  4141. "href": "http://user:pass@example.org:21/smth",
  4142. "origin": "http://example.org:21",
  4143. "protocol": "http:",
  4144. "username": "user",
  4145. "password": "pass",
  4146. "host": "example.org:21",
  4147. "hostname": "example.org",
  4148. "port": "21",
  4149. "pathname": "/smth",
  4150. "search": "",
  4151. "hash": ""
  4152. },
  4153. {
  4154. "input": "/some/path",
  4155. "base": "http://user:pass@example.org:21/smth",
  4156. "href": "http://user:pass@example.org:21/some/path",
  4157. "origin": "http://example.org:21",
  4158. "protocol": "http:",
  4159. "username": "user",
  4160. "password": "pass",
  4161. "host": "example.org:21",
  4162. "hostname": "example.org",
  4163. "port": "21",
  4164. "pathname": "/some/path",
  4165. "search": "",
  4166. "hash": ""
  4167. },
  4168. "# a set of tests designed by zcorpan for relative URLs with unknown schemes",
  4169. {
  4170. "input": "i",
  4171. "base": "sc:sd",
  4172. "failure": true
  4173. },
  4174. {
  4175. "input": "i",
  4176. "base": "sc:sd/sd",
  4177. "failure": true
  4178. },
  4179. {
  4180. "input": "i",
  4181. "base": "sc:/pa/pa",
  4182. "href": "sc:/pa/i",
  4183. "origin": "null",
  4184. "protocol": "sc:",
  4185. "username": "",
  4186. "password": "",
  4187. "host": "",
  4188. "hostname": "",
  4189. "port": "",
  4190. "pathname": "/pa/i",
  4191. "search": "",
  4192. "hash": ""
  4193. },
  4194. {
  4195. "input": "i",
  4196. "base": "sc://ho/pa",
  4197. "href": "sc://ho/i",
  4198. "origin": "null",
  4199. "protocol": "sc:",
  4200. "username": "",
  4201. "password": "",
  4202. "host": "ho",
  4203. "hostname": "ho",
  4204. "port": "",
  4205. "pathname": "/i",
  4206. "search": "",
  4207. "hash": ""
  4208. },
  4209. {
  4210. "input": "i",
  4211. "base": "sc:///pa/pa",
  4212. "href": "sc:///pa/i",
  4213. "origin": "null",
  4214. "protocol": "sc:",
  4215. "username": "",
  4216. "password": "",
  4217. "host": "",
  4218. "hostname": "",
  4219. "port": "",
  4220. "pathname": "/pa/i",
  4221. "search": "",
  4222. "hash": ""
  4223. },
  4224. {
  4225. "input": "../i",
  4226. "base": "sc:sd",
  4227. "failure": true
  4228. },
  4229. {
  4230. "input": "../i",
  4231. "base": "sc:sd/sd",
  4232. "failure": true
  4233. },
  4234. {
  4235. "input": "../i",
  4236. "base": "sc:/pa/pa",
  4237. "href": "sc:/i",
  4238. "origin": "null",
  4239. "protocol": "sc:",
  4240. "username": "",
  4241. "password": "",
  4242. "host": "",
  4243. "hostname": "",
  4244. "port": "",
  4245. "pathname": "/i",
  4246. "search": "",
  4247. "hash": ""
  4248. },
  4249. {
  4250. "input": "../i",
  4251. "base": "sc://ho/pa",
  4252. "href": "sc://ho/i",
  4253. "origin": "null",
  4254. "protocol": "sc:",
  4255. "username": "",
  4256. "password": "",
  4257. "host": "ho",
  4258. "hostname": "ho",
  4259. "port": "",
  4260. "pathname": "/i",
  4261. "search": "",
  4262. "hash": ""
  4263. },
  4264. {
  4265. "input": "../i",
  4266. "base": "sc:///pa/pa",
  4267. "href": "sc:///i",
  4268. "origin": "null",
  4269. "protocol": "sc:",
  4270. "username": "",
  4271. "password": "",
  4272. "host": "",
  4273. "hostname": "",
  4274. "port": "",
  4275. "pathname": "/i",
  4276. "search": "",
  4277. "hash": ""
  4278. },
  4279. {
  4280. "input": "/i",
  4281. "base": "sc:sd",
  4282. "failure": true
  4283. },
  4284. {
  4285. "input": "/i",
  4286. "base": "sc:sd/sd",
  4287. "failure": true
  4288. },
  4289. {
  4290. "input": "/i",
  4291. "base": "sc:/pa/pa",
  4292. "href": "sc:/i",
  4293. "origin": "null",
  4294. "protocol": "sc:",
  4295. "username": "",
  4296. "password": "",
  4297. "host": "",
  4298. "hostname": "",
  4299. "port": "",
  4300. "pathname": "/i",
  4301. "search": "",
  4302. "hash": ""
  4303. },
  4304. {
  4305. "input": "/i",
  4306. "base": "sc://ho/pa",
  4307. "href": "sc://ho/i",
  4308. "origin": "null",
  4309. "protocol": "sc:",
  4310. "username": "",
  4311. "password": "",
  4312. "host": "ho",
  4313. "hostname": "ho",
  4314. "port": "",
  4315. "pathname": "/i",
  4316. "search": "",
  4317. "hash": ""
  4318. },
  4319. {
  4320. "input": "/i",
  4321. "base": "sc:///pa/pa",
  4322. "href": "sc:///i",
  4323. "origin": "null",
  4324. "protocol": "sc:",
  4325. "username": "",
  4326. "password": "",
  4327. "host": "",
  4328. "hostname": "",
  4329. "port": "",
  4330. "pathname": "/i",
  4331. "search": "",
  4332. "hash": ""
  4333. },
  4334. {
  4335. "input": "?i",
  4336. "base": "sc:sd",
  4337. "failure": true
  4338. },
  4339. {
  4340. "input": "?i",
  4341. "base": "sc:sd/sd",
  4342. "failure": true
  4343. },
  4344. {
  4345. "input": "?i",
  4346. "base": "sc:/pa/pa",
  4347. "href": "sc:/pa/pa?i",
  4348. "origin": "null",
  4349. "protocol": "sc:",
  4350. "username": "",
  4351. "password": "",
  4352. "host": "",
  4353. "hostname": "",
  4354. "port": "",
  4355. "pathname": "/pa/pa",
  4356. "search": "?i",
  4357. "hash": ""
  4358. },
  4359. {
  4360. "input": "?i",
  4361. "base": "sc://ho/pa",
  4362. "href": "sc://ho/pa?i",
  4363. "origin": "null",
  4364. "protocol": "sc:",
  4365. "username": "",
  4366. "password": "",
  4367. "host": "ho",
  4368. "hostname": "ho",
  4369. "port": "",
  4370. "pathname": "/pa",
  4371. "search": "?i",
  4372. "hash": ""
  4373. },
  4374. {
  4375. "input": "?i",
  4376. "base": "sc:///pa/pa",
  4377. "href": "sc:///pa/pa?i",
  4378. "origin": "null",
  4379. "protocol": "sc:",
  4380. "username": "",
  4381. "password": "",
  4382. "host": "",
  4383. "hostname": "",
  4384. "port": "",
  4385. "pathname": "/pa/pa",
  4386. "search": "?i",
  4387. "hash": ""
  4388. },
  4389. {
  4390. "input": "#i",
  4391. "base": "sc:sd",
  4392. "href": "sc:sd#i",
  4393. "origin": "null",
  4394. "protocol": "sc:",
  4395. "username": "",
  4396. "password": "",
  4397. "host": "",
  4398. "hostname": "",
  4399. "port": "",
  4400. "pathname": "sd",
  4401. "search": "",
  4402. "hash": "#i"
  4403. },
  4404. {
  4405. "input": "#i",
  4406. "base": "sc:sd/sd",
  4407. "href": "sc:sd/sd#i",
  4408. "origin": "null",
  4409. "protocol": "sc:",
  4410. "username": "",
  4411. "password": "",
  4412. "host": "",
  4413. "hostname": "",
  4414. "port": "",
  4415. "pathname": "sd/sd",
  4416. "search": "",
  4417. "hash": "#i"
  4418. },
  4419. {
  4420. "input": "#i",
  4421. "base": "sc:/pa/pa",
  4422. "href": "sc:/pa/pa#i",
  4423. "origin": "null",
  4424. "protocol": "sc:",
  4425. "username": "",
  4426. "password": "",
  4427. "host": "",
  4428. "hostname": "",
  4429. "port": "",
  4430. "pathname": "/pa/pa",
  4431. "search": "",
  4432. "hash": "#i"
  4433. },
  4434. {
  4435. "input": "#i",
  4436. "base": "sc://ho/pa",
  4437. "href": "sc://ho/pa#i",
  4438. "origin": "null",
  4439. "protocol": "sc:",
  4440. "username": "",
  4441. "password": "",
  4442. "host": "ho",
  4443. "hostname": "ho",
  4444. "port": "",
  4445. "pathname": "/pa",
  4446. "search": "",
  4447. "hash": "#i"
  4448. },
  4449. {
  4450. "input": "#i",
  4451. "base": "sc:///pa/pa",
  4452. "href": "sc:///pa/pa#i",
  4453. "origin": "null",
  4454. "protocol": "sc:",
  4455. "username": "",
  4456. "password": "",
  4457. "host": "",
  4458. "hostname": "",
  4459. "port": "",
  4460. "pathname": "/pa/pa",
  4461. "search": "",
  4462. "hash": "#i"
  4463. },
  4464. "# make sure that relative URL logic works on known typically non-relative schemes too",
  4465. {
  4466. "input": "about:/../",
  4467. "base": "about:blank",
  4468. "href": "about:/",
  4469. "origin": "null",
  4470. "protocol": "about:",
  4471. "username": "",
  4472. "password": "",
  4473. "host": "",
  4474. "hostname": "",
  4475. "port": "",
  4476. "pathname": "/",
  4477. "search": "",
  4478. "hash": ""
  4479. },
  4480. {
  4481. "input": "data:/../",
  4482. "base": "about:blank",
  4483. "href": "data:/",
  4484. "origin": "null",
  4485. "protocol": "data:",
  4486. "username": "",
  4487. "password": "",
  4488. "host": "",
  4489. "hostname": "",
  4490. "port": "",
  4491. "pathname": "/",
  4492. "search": "",
  4493. "hash": ""
  4494. },
  4495. {
  4496. "input": "javascript:/../",
  4497. "base": "about:blank",
  4498. "href": "javascript:/",
  4499. "origin": "null",
  4500. "protocol": "javascript:",
  4501. "username": "",
  4502. "password": "",
  4503. "host": "",
  4504. "hostname": "",
  4505. "port": "",
  4506. "pathname": "/",
  4507. "search": "",
  4508. "hash": ""
  4509. },
  4510. {
  4511. "input": "mailto:/../",
  4512. "base": "about:blank",
  4513. "href": "mailto:/",
  4514. "origin": "null",
  4515. "protocol": "mailto:",
  4516. "username": "",
  4517. "password": "",
  4518. "host": "",
  4519. "hostname": "",
  4520. "port": "",
  4521. "pathname": "/",
  4522. "search": "",
  4523. "hash": ""
  4524. },
  4525. "# unknown schemes and their hosts",
  4526. {
  4527. "input": "sc://ñ.test/",
  4528. "base": "about:blank",
  4529. "href": "sc://%C3%B1.test/",
  4530. "origin": "null",
  4531. "protocol": "sc:",
  4532. "username": "",
  4533. "password": "",
  4534. "host": "%C3%B1.test",
  4535. "hostname": "%C3%B1.test",
  4536. "port": "",
  4537. "pathname": "/",
  4538. "search": "",
  4539. "hash": ""
  4540. },
  4541. {
  4542. "input": "sc://%/",
  4543. "base": "about:blank",
  4544. "href": "sc://%/",
  4545. "protocol": "sc:",
  4546. "username": "",
  4547. "password": "",
  4548. "host": "%",
  4549. "hostname": "%",
  4550. "port": "",
  4551. "pathname": "/",
  4552. "search": "",
  4553. "hash": ""
  4554. },
  4555. {
  4556. "input": "sc://@/",
  4557. "base": "about:blank",
  4558. "failure": true
  4559. },
  4560. {
  4561. "input": "sc://te@s:t@/",
  4562. "base": "about:blank",
  4563. "failure": true
  4564. },
  4565. {
  4566. "input": "sc://:/",
  4567. "base": "about:blank",
  4568. "failure": true
  4569. },
  4570. {
  4571. "input": "sc://:12/",
  4572. "base": "about:blank",
  4573. "failure": true
  4574. },
  4575. {
  4576. "input": "x",
  4577. "base": "sc://ñ",
  4578. "href": "sc://%C3%B1/x",
  4579. "origin": "null",
  4580. "protocol": "sc:",
  4581. "username": "",
  4582. "password": "",
  4583. "host": "%C3%B1",
  4584. "hostname": "%C3%B1",
  4585. "port": "",
  4586. "pathname": "/x",
  4587. "search": "",
  4588. "hash": ""
  4589. },
  4590. "# unknown schemes and backslashes",
  4591. {
  4592. "input": "sc:\\../",
  4593. "base": "about:blank",
  4594. "href": "sc:\\../",
  4595. "origin": "null",
  4596. "protocol": "sc:",
  4597. "username": "",
  4598. "password": "",
  4599. "host": "",
  4600. "hostname": "",
  4601. "port": "",
  4602. "pathname": "\\../",
  4603. "search": "",
  4604. "hash": ""
  4605. },
  4606. "# unknown scheme with path looking like a password",
  4607. {
  4608. "input": "sc::a@example.net",
  4609. "base": "about:blank",
  4610. "href": "sc::a@example.net",
  4611. "origin": "null",
  4612. "protocol": "sc:",
  4613. "username": "",
  4614. "password": "",
  4615. "host": "",
  4616. "hostname": "",
  4617. "port": "",
  4618. "pathname": ":a@example.net",
  4619. "search": "",
  4620. "hash": ""
  4621. },
  4622. "# unknown scheme with bogus percent-encoding",
  4623. {
  4624. "input": "wow:%NBD",
  4625. "base": "about:blank",
  4626. "href": "wow:%NBD",
  4627. "origin": "null",
  4628. "protocol": "wow:",
  4629. "username": "",
  4630. "password": "",
  4631. "host": "",
  4632. "hostname": "",
  4633. "port": "",
  4634. "pathname": "%NBD",
  4635. "search": "",
  4636. "hash": ""
  4637. },
  4638. {
  4639. "input": "wow:%1G",
  4640. "base": "about:blank",
  4641. "href": "wow:%1G",
  4642. "origin": "null",
  4643. "protocol": "wow:",
  4644. "username": "",
  4645. "password": "",
  4646. "host": "",
  4647. "hostname": "",
  4648. "port": "",
  4649. "pathname": "%1G",
  4650. "search": "",
  4651. "hash": ""
  4652. },
  4653. "# unknown scheme with non-URL characters",
  4654. {
  4655. "input": "wow:\uFFFF",
  4656. "base": "about:blank",
  4657. "href": "wow:%EF%BF%BF",
  4658. "origin": "null",
  4659. "protocol": "wow:",
  4660. "username": "",
  4661. "password": "",
  4662. "host": "",
  4663. "hostname": "",
  4664. "port": "",
  4665. "pathname": "%EF%BF%BF",
  4666. "search": "",
  4667. "hash": ""
  4668. },
  4669. "Forbidden host code points",
  4670. {
  4671. "input": "sc://a\u0000b/",
  4672. "base": "about:blank",
  4673. "failure": true
  4674. },
  4675. {
  4676. "input": "sc://a b/",
  4677. "base": "about:blank",
  4678. "failure": true
  4679. },
  4680. {
  4681. "input": "sc://a<b",
  4682. "base": "about:blank",
  4683. "failure": true
  4684. },
  4685. {
  4686. "input": "sc://a>b",
  4687. "base": "about:blank",
  4688. "failure": true
  4689. },
  4690. {
  4691. "input": "sc://a[b/",
  4692. "base": "about:blank",
  4693. "failure": true
  4694. },
  4695. {
  4696. "input": "sc://a\\b/",
  4697. "base": "about:blank",
  4698. "failure": true
  4699. },
  4700. {
  4701. "input": "sc://a]b/",
  4702. "base": "about:blank",
  4703. "failure": true
  4704. },
  4705. {
  4706. "input": "sc://a^b",
  4707. "base": "about:blank",
  4708. "failure": true
  4709. },
  4710. "Forbidden host codepoints: tabs and newlines are removed during preprocessing",
  4711. {
  4712. "input": "foo://ho\u0009st/",
  4713. "base": "about:blank",
  4714. "hash": "",
  4715. "host": "host",
  4716. "hostname": "host",
  4717. "href":"foo://host/",
  4718. "password": "",
  4719. "pathname": "/",
  4720. "port":"",
  4721. "protocol": "foo:",
  4722. "search": "",
  4723. "username": ""
  4724. },
  4725. {
  4726. "input": "foo://ho\u000Ast/",
  4727. "base": "about:blank",
  4728. "hash": "",
  4729. "host": "host",
  4730. "hostname": "host",
  4731. "href":"foo://host/",
  4732. "password": "",
  4733. "pathname": "/",
  4734. "port":"",
  4735. "protocol": "foo:",
  4736. "search": "",
  4737. "username": ""
  4738. },
  4739. {
  4740. "input": "foo://ho\u000Dst/",
  4741. "base": "about:blank",
  4742. "hash": "",
  4743. "host": "host",
  4744. "hostname": "host",
  4745. "href":"foo://host/",
  4746. "password": "",
  4747. "pathname": "/",
  4748. "port":"",
  4749. "protocol": "foo:",
  4750. "search": "",
  4751. "username": ""
  4752. },
  4753. "Forbidden domain code-points",
  4754. {
  4755. "input": "http://a\u0000b/",
  4756. "base": "about:blank",
  4757. "failure": true
  4758. },
  4759. {
  4760. "input": "http://a\u0001b/",
  4761. "base": "about:blank",
  4762. "hash": "",
  4763. "host": "a\u0001b",
  4764. "hostname": "a\u0001b",
  4765. "href":"http://a\u0001b/",
  4766. "password": "",
  4767. "pathname": "/",
  4768. "port":"",
  4769. "protocol": "http:",
  4770. "search": "",
  4771. "username": ""
  4772. },
  4773. {
  4774. "input": "http://a\u0002b/",
  4775. "base": "about:blank",
  4776. "hash": "",
  4777. "host": "a\u0002b",
  4778. "hostname": "a\u0002b",
  4779. "href":"http://a\u0002b/",
  4780. "password": "",
  4781. "pathname": "/",
  4782. "port":"",
  4783. "protocol": "http:",
  4784. "search": "",
  4785. "username": ""
  4786. },
  4787. {
  4788. "input": "http://a\u0003b/",
  4789. "base": "about:blank",
  4790. "hash": "",
  4791. "host": "a\u0003b",
  4792. "hostname": "a\u0003b",
  4793. "href":"http://a\u0003b/",
  4794. "password": "",
  4795. "pathname": "/",
  4796. "port":"",
  4797. "protocol": "http:",
  4798. "search": "",
  4799. "username": ""
  4800. },
  4801. {
  4802. "input": "http://a\u0004b/",
  4803. "base": "about:blank",
  4804. "hash": "",
  4805. "host": "a\u0004b",
  4806. "hostname": "a\u0004b",
  4807. "href":"http://a\u0004b/",
  4808. "password": "",
  4809. "pathname": "/",
  4810. "port":"",
  4811. "protocol": "http:",
  4812. "search": "",
  4813. "username": ""
  4814. },
  4815. {
  4816. "input": "http://a\u0005b/",
  4817. "base": "about:blank",
  4818. "hash": "",
  4819. "host": "a\u0005b",
  4820. "hostname": "a\u0005b",
  4821. "href":"http://a\u0005b/",
  4822. "password": "",
  4823. "pathname": "/",
  4824. "port":"",
  4825. "protocol": "http:",
  4826. "search": "",
  4827. "username": ""
  4828. },
  4829. {
  4830. "input": "http://a\u0006b/",
  4831. "base": "about:blank",
  4832. "hash": "",
  4833. "host": "a\u0006b",
  4834. "hostname": "a\u0006b",
  4835. "href":"http://a\u0006b/",
  4836. "password": "",
  4837. "pathname": "/",
  4838. "port":"",
  4839. "protocol": "http:",
  4840. "search": "",
  4841. "username": ""
  4842. },
  4843. {
  4844. "input": "http://a\u0007b/",
  4845. "base": "about:blank",
  4846. "hash": "",
  4847. "host": "a\u0007b",
  4848. "hostname": "a\u0007b",
  4849. "href":"http://a\u0007b/",
  4850. "password": "",
  4851. "pathname": "/",
  4852. "port":"",
  4853. "protocol": "http:",
  4854. "search": "",
  4855. "username": ""
  4856. },
  4857. {
  4858. "input": "http://a\u0008b/",
  4859. "base": "about:blank",
  4860. "hash": "",
  4861. "host": "a\u0008b",
  4862. "hostname": "a\u0008b",
  4863. "href":"http://a\u0008b/",
  4864. "password": "",
  4865. "pathname": "/",
  4866. "port":"",
  4867. "protocol": "http:",
  4868. "search": "",
  4869. "username": ""
  4870. },
  4871. {
  4872. "input": "http://a\u000Bb/",
  4873. "base": "about:blank",
  4874. "hash": "",
  4875. "host": "a\u000Bb",
  4876. "hostname": "a\u000Bb",
  4877. "href":"http://a\u000Bb/",
  4878. "password": "",
  4879. "pathname": "/",
  4880. "port":"",
  4881. "protocol": "http:",
  4882. "search": "",
  4883. "username": ""
  4884. },
  4885. {
  4886. "input": "http://a\u000Cb/",
  4887. "base": "about:blank",
  4888. "hash": "",
  4889. "host": "a\u000Cb",
  4890. "hostname": "a\u000Cb",
  4891. "href":"http://a\u000Cb/",
  4892. "password": "",
  4893. "pathname": "/",
  4894. "port":"",
  4895. "protocol": "http:",
  4896. "search": "",
  4897. "username": ""
  4898. },
  4899. {
  4900. "input": "http://a\u000Eb/",
  4901. "base": "about:blank",
  4902. "hash": "",
  4903. "host": "a\u000Eb",
  4904. "hostname": "a\u000Eb",
  4905. "href":"http://a\u000Eb/",
  4906. "password": "",
  4907. "pathname": "/",
  4908. "port":"",
  4909. "protocol": "http:",
  4910. "search": "",
  4911. "username": ""
  4912. },
  4913. {
  4914. "input": "http://a\u000Fb/",
  4915. "base": "about:blank",
  4916. "hash": "",
  4917. "host": "a\u000Fb",
  4918. "hostname": "a\u000Fb",
  4919. "href":"http://a\u000Fb/",
  4920. "password": "",
  4921. "pathname": "/",
  4922. "port":"",
  4923. "protocol": "http:",
  4924. "search": "",
  4925. "username": ""
  4926. },
  4927. {
  4928. "input": "http://a\u0010b/",
  4929. "base": "about:blank",
  4930. "hash": "",
  4931. "host": "a\u0010b",
  4932. "hostname": "a\u0010b",
  4933. "href":"http://a\u0010b/",
  4934. "password": "",
  4935. "pathname": "/",
  4936. "port":"",
  4937. "protocol": "http:",
  4938. "search": "",
  4939. "username": ""
  4940. },
  4941. {
  4942. "input": "http://a\u0011b/",
  4943. "base": "about:blank",
  4944. "hash": "",
  4945. "host": "a\u0011b",
  4946. "hostname": "a\u0011b",
  4947. "href":"http://a\u0011b/",
  4948. "password": "",
  4949. "pathname": "/",
  4950. "port":"",
  4951. "protocol": "http:",
  4952. "search": "",
  4953. "username": ""
  4954. },
  4955. {
  4956. "input": "http://a\u0012b/",
  4957. "base": "about:blank",
  4958. "hash": "",
  4959. "host": "a\u0012b",
  4960. "hostname": "a\u0012b",
  4961. "href":"http://a\u0012b/",
  4962. "password": "",
  4963. "pathname": "/",
  4964. "port":"",
  4965. "protocol": "http:",
  4966. "search": "",
  4967. "username": ""
  4968. },
  4969. {
  4970. "input": "http://a\u0013b/",
  4971. "base": "about:blank",
  4972. "hash": "",
  4973. "host": "a\u0013b",
  4974. "hostname": "a\u0013b",
  4975. "href":"http://a\u0013b/",
  4976. "password": "",
  4977. "pathname": "/",
  4978. "port":"",
  4979. "protocol": "http:",
  4980. "search": "",
  4981. "username": ""
  4982. },
  4983. {
  4984. "input": "http://a\u0014b/",
  4985. "base": "about:blank",
  4986. "hash": "",
  4987. "host": "a\u0014b",
  4988. "hostname": "a\u0014b",
  4989. "href":"http://a\u0014b/",
  4990. "password": "",
  4991. "pathname": "/",
  4992. "port":"",
  4993. "protocol": "http:",
  4994. "search": "",
  4995. "username": ""
  4996. },
  4997. {
  4998. "input": "http://a\u0015b/",
  4999. "base": "about:blank",
  5000. "hash": "",
  5001. "host": "a\u0015b",
  5002. "hostname": "a\u0015b",
  5003. "href":"http://a\u0015b/",
  5004. "password": "",
  5005. "pathname": "/",
  5006. "port":"",
  5007. "protocol": "http:",
  5008. "search": "",
  5009. "username": ""
  5010. },
  5011. {
  5012. "input": "http://a\u0016b/",
  5013. "base": "about:blank",
  5014. "hash": "",
  5015. "host": "a\u0016b",
  5016. "hostname": "a\u0016b",
  5017. "href":"http://a\u0016b/",
  5018. "password": "",
  5019. "pathname": "/",
  5020. "port":"",
  5021. "protocol": "http:",
  5022. "search": "",
  5023. "username": ""
  5024. },
  5025. {
  5026. "input": "http://a\u0017b/",
  5027. "base": "about:blank",
  5028. "hash": "",
  5029. "host": "a\u0017b",
  5030. "hostname": "a\u0017b",
  5031. "href":"http://a\u0017b/",
  5032. "password": "",
  5033. "pathname": "/",
  5034. "port":"",
  5035. "protocol": "http:",
  5036. "search": "",
  5037. "username": ""
  5038. },
  5039. {
  5040. "input": "http://a\u0018b/",
  5041. "base": "about:blank",
  5042. "hash": "",
  5043. "host": "a\u0018b",
  5044. "hostname": "a\u0018b",
  5045. "href":"http://a\u0018b/",
  5046. "password": "",
  5047. "pathname": "/",
  5048. "port":"",
  5049. "protocol": "http:",
  5050. "search": "",
  5051. "username": ""
  5052. },
  5053. {
  5054. "input": "http://a\u0019b/",
  5055. "base": "about:blank",
  5056. "hash": "",
  5057. "host": "a\u0019b",
  5058. "hostname": "a\u0019b",
  5059. "href":"http://a\u0019b/",
  5060. "password": "",
  5061. "pathname": "/",
  5062. "port":"",
  5063. "protocol": "http:",
  5064. "search": "",
  5065. "username": ""
  5066. },
  5067. {
  5068. "input": "http://a\u001Ab/",
  5069. "base": "about:blank",
  5070. "hash": "",
  5071. "host": "a\u001Ab",
  5072. "hostname": "a\u001Ab",
  5073. "href":"http://a\u001Ab/",
  5074. "password": "",
  5075. "pathname": "/",
  5076. "port":"",
  5077. "protocol": "http:",
  5078. "search": "",
  5079. "username": ""
  5080. },
  5081. {
  5082. "input": "http://a\u001Bb/",
  5083. "base": "about:blank",
  5084. "hash": "",
  5085. "host": "a\u001Bb",
  5086. "hostname": "a\u001Bb",
  5087. "href":"http://a\u001Bb/",
  5088. "password": "",
  5089. "pathname": "/",
  5090. "port":"",
  5091. "protocol": "http:",
  5092. "search": "",
  5093. "username": ""
  5094. },
  5095. {
  5096. "input": "http://a\u001Cb/",
  5097. "base": "about:blank",
  5098. "hash": "",
  5099. "host": "a\u001Cb",
  5100. "hostname": "a\u001Cb",
  5101. "href":"http://a\u001Cb/",
  5102. "password": "",
  5103. "pathname": "/",
  5104. "port":"",
  5105. "protocol": "http:",
  5106. "search": "",
  5107. "username": ""
  5108. },
  5109. {
  5110. "input": "http://a\u001Db/",
  5111. "base": "about:blank",
  5112. "hash": "",
  5113. "host": "a\u001Db",
  5114. "hostname": "a\u001Db",
  5115. "href":"http://a\u001Db/",
  5116. "password": "",
  5117. "pathname": "/",
  5118. "port":"",
  5119. "protocol": "http:",
  5120. "search": "",
  5121. "username": ""
  5122. },
  5123. {
  5124. "input": "http://a\u001Eb/",
  5125. "base": "about:blank",
  5126. "hash": "",
  5127. "host": "a\u001Eb",
  5128. "hostname": "a\u001Eb",
  5129. "href":"http://a\u001Eb/",
  5130. "password": "",
  5131. "pathname": "/",
  5132. "port":"",
  5133. "protocol": "http:",
  5134. "search": "",
  5135. "username": ""
  5136. },
  5137. {
  5138. "input": "http://a\u001Fb/",
  5139. "base": "about:blank",
  5140. "hash": "",
  5141. "host": "a\u001Fb",
  5142. "hostname": "a\u001Fb",
  5143. "href":"http://a\u001Fb/",
  5144. "password": "",
  5145. "pathname": "/",
  5146. "port":"",
  5147. "protocol": "http:",
  5148. "search": "",
  5149. "username": ""
  5150. },
  5151. {
  5152. "input": "http://a b/",
  5153. "base": "about:blank",
  5154. "failure": true
  5155. },
  5156. {
  5157. "input": "http://a%b/",
  5158. "base": "about:blank",
  5159. "failure": true
  5160. },
  5161. {
  5162. "input": "http://a<b",
  5163. "base": "about:blank",
  5164. "failure": true
  5165. },
  5166. {
  5167. "input": "http://a>b",
  5168. "base": "about:blank",
  5169. "failure": true
  5170. },
  5171. {
  5172. "input": "http://a[b/",
  5173. "base": "about:blank",
  5174. "failure": true
  5175. },
  5176. {
  5177. "input": "http://a]b/",
  5178. "base": "about:blank",
  5179. "failure": true
  5180. },
  5181. {
  5182. "input": "http://a^b",
  5183. "base": "about:blank",
  5184. "failure": true
  5185. },
  5186. {
  5187. "input": "http://a\u007Fb/",
  5188. "base": "about:blank",
  5189. "hash": "",
  5190. "host": "a\u007Fb",
  5191. "hostname": "a\u007Fb",
  5192. "href":"http://a\u007Fb/",
  5193. "password": "",
  5194. "pathname": "/",
  5195. "port":"",
  5196. "protocol": "http:",
  5197. "search": "",
  5198. "username": ""
  5199. },
  5200. "Forbidden domain codepoints: tabs and newlines are removed during preprocessing",
  5201. {
  5202. "input": "http://ho\u0009st/",
  5203. "base": "about:blank",
  5204. "hash": "",
  5205. "host": "host",
  5206. "hostname": "host",
  5207. "href":"http://host/",
  5208. "password": "",
  5209. "pathname": "/",
  5210. "port":"",
  5211. "protocol": "http:",
  5212. "search": "",
  5213. "username": ""
  5214. },
  5215. {
  5216. "input": "http://ho\u000Ast/",
  5217. "base": "about:blank",
  5218. "hash": "",
  5219. "host": "host",
  5220. "hostname": "host",
  5221. "href":"http://host/",
  5222. "password": "",
  5223. "pathname": "/",
  5224. "port":"",
  5225. "protocol": "http:",
  5226. "search": "",
  5227. "username": ""
  5228. },
  5229. {
  5230. "input": "http://ho\u000Dst/",
  5231. "base": "about:blank",
  5232. "hash": "",
  5233. "host": "host",
  5234. "hostname": "host",
  5235. "href":"http://host/",
  5236. "password": "",
  5237. "pathname": "/",
  5238. "port":"",
  5239. "protocol": "http:",
  5240. "search": "",
  5241. "username": ""
  5242. },
  5243. "Encoded forbidden domain codepoints in special URLs",
  5244. {
  5245. "input": "http://ho%00st/",
  5246. "base": "about:blank",
  5247. "failure": true
  5248. },
  5249. {
  5250. "input": "http://ho%01st/",
  5251. "base": "about:blank",
  5252. "hash": "",
  5253. "host": "ho\u0001st",
  5254. "hostname": "ho\u0001st",
  5255. "href":"http://ho\u0001st/",
  5256. "password": "",
  5257. "pathname": "/",
  5258. "port":"",
  5259. "protocol": "http:",
  5260. "search": "",
  5261. "username": ""
  5262. },
  5263. {
  5264. "input": "http://ho%02st/",
  5265. "base": "about:blank",
  5266. "hash": "",
  5267. "host": "ho\u0002st",
  5268. "hostname": "ho\u0002st",
  5269. "href":"http://ho\u0002st/",
  5270. "password": "",
  5271. "pathname": "/",
  5272. "port":"",
  5273. "protocol": "http:",
  5274. "search": "",
  5275. "username": ""
  5276. },
  5277. {
  5278. "input": "http://ho%03st/",
  5279. "base": "about:blank",
  5280. "hash": "",
  5281. "host": "ho\u0003st",
  5282. "hostname": "ho\u0003st",
  5283. "href":"http://ho\u0003st/",
  5284. "password": "",
  5285. "pathname": "/",
  5286. "port":"",
  5287. "protocol": "http:",
  5288. "search": "",
  5289. "username": ""
  5290. },
  5291. {
  5292. "input": "http://ho%04st/",
  5293. "base": "about:blank",
  5294. "hash": "",
  5295. "host": "ho\u0004st",
  5296. "hostname": "ho\u0004st",
  5297. "href":"http://ho\u0004st/",
  5298. "password": "",
  5299. "pathname": "/",
  5300. "port":"",
  5301. "protocol": "http:",
  5302. "search": "",
  5303. "username": ""
  5304. },
  5305. {
  5306. "input": "http://ho%05st/",
  5307. "base": "about:blank",
  5308. "hash": "",
  5309. "host": "ho\u0005st",
  5310. "hostname": "ho\u0005st",
  5311. "href":"http://ho\u0005st/",
  5312. "password": "",
  5313. "pathname": "/",
  5314. "port":"",
  5315. "protocol": "http:",
  5316. "search": "",
  5317. "username": ""
  5318. },
  5319. {
  5320. "input": "http://ho%06st/",
  5321. "base": "about:blank",
  5322. "hash": "",
  5323. "host": "ho\u0006st",
  5324. "hostname": "ho\u0006st",
  5325. "href":"http://ho\u0006st/",
  5326. "password": "",
  5327. "pathname": "/",
  5328. "port":"",
  5329. "protocol": "http:",
  5330. "search": "",
  5331. "username": ""
  5332. },
  5333. {
  5334. "input": "http://ho%07st/",
  5335. "base": "about:blank",
  5336. "hash": "",
  5337. "host": "ho\u0007st",
  5338. "hostname": "ho\u0007st",
  5339. "href":"http://ho\u0007st/",
  5340. "password": "",
  5341. "pathname": "/",
  5342. "port":"",
  5343. "protocol": "http:",
  5344. "search": "",
  5345. "username": ""
  5346. },
  5347. {
  5348. "input": "http://ho%08st/",
  5349. "base": "about:blank",
  5350. "hash": "",
  5351. "host": "ho\u0008st",
  5352. "hostname": "ho\u0008st",
  5353. "href":"http://ho\u0008st/",
  5354. "password": "",
  5355. "pathname": "/",
  5356. "port":"",
  5357. "protocol": "http:",
  5358. "search": "",
  5359. "username": ""
  5360. },
  5361. {
  5362. "input": "http://ho%09st/",
  5363. "base": "about:blank",
  5364. "failure": true
  5365. },
  5366. {
  5367. "input": "http://ho%0Ast/",
  5368. "base": "about:blank",
  5369. "failure": true
  5370. },
  5371. {
  5372. "input": "http://ho%0Bst/",
  5373. "base": "about:blank",
  5374. "hash": "",
  5375. "host": "ho\u000Bst",
  5376. "hostname": "ho\u000Bst",
  5377. "href":"http://ho\u000Bst/",
  5378. "password": "",
  5379. "pathname": "/",
  5380. "port":"",
  5381. "protocol": "http:",
  5382. "search": "",
  5383. "username": ""
  5384. },
  5385. {
  5386. "input": "http://ho%0Cst/",
  5387. "base": "about:blank",
  5388. "hash": "",
  5389. "host": "ho\u000Cst",
  5390. "hostname": "ho\u000Cst",
  5391. "href":"http://ho\u000Cst/",
  5392. "password": "",
  5393. "pathname": "/",
  5394. "port":"",
  5395. "protocol": "http:",
  5396. "search": "",
  5397. "username": ""
  5398. },
  5399. {
  5400. "input": "http://ho%0Dst/",
  5401. "base": "about:blank",
  5402. "failure": true
  5403. },
  5404. {
  5405. "input": "http://ho%0Est/",
  5406. "base": "about:blank",
  5407. "hash": "",
  5408. "host": "ho\u000Est",
  5409. "hostname": "ho\u000Est",
  5410. "href":"http://ho\u000Est/",
  5411. "password": "",
  5412. "pathname": "/",
  5413. "port":"",
  5414. "protocol": "http:",
  5415. "search": "",
  5416. "username": ""
  5417. },
  5418. {
  5419. "input": "http://ho%0Fst/",
  5420. "base": "about:blank",
  5421. "hash": "",
  5422. "host": "ho\u000Fst",
  5423. "hostname": "ho\u000Fst",
  5424. "href":"http://ho\u000Fst/",
  5425. "password": "",
  5426. "pathname": "/",
  5427. "port":"",
  5428. "protocol": "http:",
  5429. "search": "",
  5430. "username": ""
  5431. },
  5432. {
  5433. "input": "http://ho%10st/",
  5434. "base": "about:blank",
  5435. "hash": "",
  5436. "host": "ho\u0010st",
  5437. "hostname": "ho\u0010st",
  5438. "href":"http://ho\u0010st/",
  5439. "password": "",
  5440. "pathname": "/",
  5441. "port":"",
  5442. "protocol": "http:",
  5443. "search": "",
  5444. "username": ""
  5445. },
  5446. {
  5447. "input": "http://ho%11st/",
  5448. "base": "about:blank",
  5449. "hash": "",
  5450. "host": "ho\u0011st",
  5451. "hostname": "ho\u0011st",
  5452. "href":"http://ho\u0011st/",
  5453. "password": "",
  5454. "pathname": "/",
  5455. "port":"",
  5456. "protocol": "http:",
  5457. "search": "",
  5458. "username": ""
  5459. },
  5460. {
  5461. "input": "http://ho%12st/",
  5462. "base": "about:blank",
  5463. "hash": "",
  5464. "host": "ho\u0012st",
  5465. "hostname": "ho\u0012st",
  5466. "href":"http://ho\u0012st/",
  5467. "password": "",
  5468. "pathname": "/",
  5469. "port":"",
  5470. "protocol": "http:",
  5471. "search": "",
  5472. "username": ""
  5473. },
  5474. {
  5475. "input": "http://ho%13st/",
  5476. "base": "about:blank",
  5477. "hash": "",
  5478. "host": "ho\u0013st",
  5479. "hostname": "ho\u0013st",
  5480. "href":"http://ho\u0013st/",
  5481. "password": "",
  5482. "pathname": "/",
  5483. "port":"",
  5484. "protocol": "http:",
  5485. "search": "",
  5486. "username": ""
  5487. },
  5488. {
  5489. "input": "http://ho%14st/",
  5490. "base": "about:blank",
  5491. "hash": "",
  5492. "host": "ho\u0014st",
  5493. "hostname": "ho\u0014st",
  5494. "href":"http://ho\u0014st/",
  5495. "password": "",
  5496. "pathname": "/",
  5497. "port":"",
  5498. "protocol": "http:",
  5499. "search": "",
  5500. "username": ""
  5501. },
  5502. {
  5503. "input": "http://ho%15st/",
  5504. "base": "about:blank",
  5505. "hash": "",
  5506. "host": "ho\u0015st",
  5507. "hostname": "ho\u0015st",
  5508. "href":"http://ho\u0015st/",
  5509. "password": "",
  5510. "pathname": "/",
  5511. "port":"",
  5512. "protocol": "http:",
  5513. "search": "",
  5514. "username": ""
  5515. },
  5516. {
  5517. "input": "http://ho%16st/",
  5518. "base": "about:blank",
  5519. "hash": "",
  5520. "host": "ho\u0016st",
  5521. "hostname": "ho\u0016st",
  5522. "href":"http://ho\u0016st/",
  5523. "password": "",
  5524. "pathname": "/",
  5525. "port":"",
  5526. "protocol": "http:",
  5527. "search": "",
  5528. "username": ""
  5529. },
  5530. {
  5531. "input": "http://ho%17st/",
  5532. "base": "about:blank",
  5533. "hash": "",
  5534. "host": "ho\u0017st",
  5535. "hostname": "ho\u0017st",
  5536. "href":"http://ho\u0017st/",
  5537. "password": "",
  5538. "pathname": "/",
  5539. "port":"",
  5540. "protocol": "http:",
  5541. "search": "",
  5542. "username": ""
  5543. },
  5544. {
  5545. "input": "http://ho%18st/",
  5546. "base": "about:blank",
  5547. "hash": "",
  5548. "host": "ho\u0018st",
  5549. "hostname": "ho\u0018st",
  5550. "href":"http://ho\u0018st/",
  5551. "password": "",
  5552. "pathname": "/",
  5553. "port":"",
  5554. "protocol": "http:",
  5555. "search": "",
  5556. "username": ""
  5557. },
  5558. {
  5559. "input": "http://ho%19st/",
  5560. "base": "about:blank",
  5561. "hash": "",
  5562. "host": "ho\u0019st",
  5563. "hostname": "ho\u0019st",
  5564. "href":"http://ho\u0019st/",
  5565. "password": "",
  5566. "pathname": "/",
  5567. "port":"",
  5568. "protocol": "http:",
  5569. "search": "",
  5570. "username": ""
  5571. },
  5572. {
  5573. "input": "http://ho%1Ast/",
  5574. "base": "about:blank",
  5575. "hash": "",
  5576. "host": "ho\u001Ast",
  5577. "hostname": "ho\u001Ast",
  5578. "href":"http://ho\u001Ast/",
  5579. "password": "",
  5580. "pathname": "/",
  5581. "port":"",
  5582. "protocol": "http:",
  5583. "search": "",
  5584. "username": ""
  5585. },
  5586. {
  5587. "input": "http://ho%1Bst/",
  5588. "base": "about:blank",
  5589. "hash": "",
  5590. "host": "ho\u001Bst",
  5591. "hostname": "ho\u001Bst",
  5592. "href":"http://ho\u001Bst/",
  5593. "password": "",
  5594. "pathname": "/",
  5595. "port":"",
  5596. "protocol": "http:",
  5597. "search": "",
  5598. "username": ""
  5599. },
  5600. {
  5601. "input": "http://ho%1Cst/",
  5602. "base": "about:blank",
  5603. "hash": "",
  5604. "host": "ho\u001Cst",
  5605. "hostname": "ho\u001Cst",
  5606. "href":"http://ho\u001Cst/",
  5607. "password": "",
  5608. "pathname": "/",
  5609. "port":"",
  5610. "protocol": "http:",
  5611. "search": "",
  5612. "username": ""
  5613. },
  5614. {
  5615. "input": "http://ho%1Dst/",
  5616. "base": "about:blank",
  5617. "hash": "",
  5618. "host": "ho\u001Dst",
  5619. "hostname": "ho\u001Dst",
  5620. "href":"http://ho\u001Dst/",
  5621. "password": "",
  5622. "pathname": "/",
  5623. "port":"",
  5624. "protocol": "http:",
  5625. "search": "",
  5626. "username": ""
  5627. },
  5628. {
  5629. "input": "http://ho%1Est/",
  5630. "base": "about:blank",
  5631. "hash": "",
  5632. "host": "ho\u001Est",
  5633. "hostname": "ho\u001Est",
  5634. "href":"http://ho\u001Est/",
  5635. "password": "",
  5636. "pathname": "/",
  5637. "port":"",
  5638. "protocol": "http:",
  5639. "search": "",
  5640. "username": ""
  5641. },
  5642. {
  5643. "input": "http://ho%1Fst/",
  5644. "base": "about:blank",
  5645. "hash": "",
  5646. "host": "ho\u001Fst",
  5647. "hostname": "ho\u001Fst",
  5648. "href":"http://ho\u001Fst/",
  5649. "password": "",
  5650. "pathname": "/",
  5651. "port":"",
  5652. "protocol": "http:",
  5653. "search": "",
  5654. "username": ""
  5655. },
  5656. {
  5657. "input": "http://ho%20st/",
  5658. "base": "about:blank",
  5659. "failure": true
  5660. },
  5661. {
  5662. "input": "http://ho%23st/",
  5663. "base": "about:blank",
  5664. "failure": true
  5665. },
  5666. {
  5667. "input": "http://ho%25st/",
  5668. "base": "about:blank",
  5669. "failure": true
  5670. },
  5671. {
  5672. "input": "http://ho%2Fst/",
  5673. "base": "about:blank",
  5674. "failure": true
  5675. },
  5676. {
  5677. "input": "http://ho%3Ast/",
  5678. "base": "about:blank",
  5679. "failure": true
  5680. },
  5681. {
  5682. "input": "http://ho%3Cst/",
  5683. "base": "about:blank",
  5684. "failure": true
  5685. },
  5686. {
  5687. "input": "http://ho%3Est/",
  5688. "base": "about:blank",
  5689. "failure": true
  5690. },
  5691. {
  5692. "input": "http://ho%3Fst/",
  5693. "base": "about:blank",
  5694. "failure": true
  5695. },
  5696. {
  5697. "input": "http://ho%40st/",
  5698. "base": "about:blank",
  5699. "failure": true
  5700. },
  5701. {
  5702. "input": "http://ho%5Bst/",
  5703. "base": "about:blank",
  5704. "failure": true
  5705. },
  5706. {
  5707. "input": "http://ho%5Cst/",
  5708. "base": "about:blank",
  5709. "failure": true
  5710. },
  5711. {
  5712. "input": "http://ho%5Dst/",
  5713. "base": "about:blank",
  5714. "failure": true
  5715. },
  5716. {
  5717. "input": "http://ho%7Fst/",
  5718. "base": "about:blank",
  5719. "hash": "",
  5720. "host": "ho\u007Fst",
  5721. "hostname": "ho\u007Fst",
  5722. "href":"http://ho\u007Fst/",
  5723. "password": "",
  5724. "pathname": "/",
  5725. "port":"",
  5726. "protocol": "http:",
  5727. "search": "",
  5728. "username": ""
  5729. },
  5730. "Allowed host/domain code points",
  5731. {
  5732. "input": "http://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$&'()*+,-.;=_`{}~/",
  5733. "base": "about:blank",
  5734. "href": "http://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$&'()*+,-.;=_`{}~/",
  5735. "origin": "http://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$&'()*+,-.;=_`{}~",
  5736. "protocol": "http:",
  5737. "username": "",
  5738. "password": "",
  5739. "host": "\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$&'()*+,-.;=_`{}~",
  5740. "hostname": "\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$&'()*+,-.;=_`{}~",
  5741. "port": "",
  5742. "pathname": "/",
  5743. "search": "",
  5744. "hash": ""
  5745. },
  5746. {
  5747. "input": "sc://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$%&'()*+,-.;=_`{}~/",
  5748. "base": "about:blank",
  5749. "href": "sc://%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~/",
  5750. "origin": "null",
  5751. "protocol": "sc:",
  5752. "username": "",
  5753. "password": "",
  5754. "host": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~",
  5755. "hostname": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~",
  5756. "port": "",
  5757. "pathname": "/",
  5758. "search": "",
  5759. "hash": ""
  5760. },
  5761. "# Hosts and percent-encoding",
  5762. {
  5763. "input": "ftp://example.com%80/",
  5764. "base": "about:blank",
  5765. "failure": true
  5766. },
  5767. {
  5768. "input": "ftp://example.com%A0/",
  5769. "base": "about:blank",
  5770. "failure": true
  5771. },
  5772. {
  5773. "input": "https://example.com%80/",
  5774. "base": "about:blank",
  5775. "failure": true
  5776. },
  5777. {
  5778. "input": "https://example.com%A0/",
  5779. "base": "about:blank",
  5780. "failure": true
  5781. },
  5782. {
  5783. "input": "ftp://%e2%98%83",
  5784. "base": "about:blank",
  5785. "href": "ftp://xn--n3h/",
  5786. "origin": "ftp://xn--n3h",
  5787. "protocol": "ftp:",
  5788. "username": "",
  5789. "password": "",
  5790. "host": "xn--n3h",
  5791. "hostname": "xn--n3h",
  5792. "port": "",
  5793. "pathname": "/",
  5794. "search": "",
  5795. "hash": ""
  5796. },
  5797. {
  5798. "input": "https://%e2%98%83",
  5799. "base": "about:blank",
  5800. "href": "https://xn--n3h/",
  5801. "origin": "https://xn--n3h",
  5802. "protocol": "https:",
  5803. "username": "",
  5804. "password": "",
  5805. "host": "xn--n3h",
  5806. "hostname": "xn--n3h",
  5807. "port": "",
  5808. "pathname": "/",
  5809. "search": "",
  5810. "hash": ""
  5811. },
  5812. "# tests from jsdom/whatwg-url designed for code coverage",
  5813. {
  5814. "input": "http://127.0.0.1:10100/relative_import.html",
  5815. "base": "about:blank",
  5816. "href": "http://127.0.0.1:10100/relative_import.html",
  5817. "origin": "http://127.0.0.1:10100",
  5818. "protocol": "http:",
  5819. "username": "",
  5820. "password": "",
  5821. "host": "127.0.0.1:10100",
  5822. "hostname": "127.0.0.1",
  5823. "port": "10100",
  5824. "pathname": "/relative_import.html",
  5825. "search": "",
  5826. "hash": ""
  5827. },
  5828. {
  5829. "input": "http://facebook.com/?foo=%7B%22abc%22",
  5830. "base": "about:blank",
  5831. "href": "http://facebook.com/?foo=%7B%22abc%22",
  5832. "origin": "http://facebook.com",
  5833. "protocol": "http:",
  5834. "username": "",
  5835. "password": "",
  5836. "host": "facebook.com",
  5837. "hostname": "facebook.com",
  5838. "port": "",
  5839. "pathname": "/",
  5840. "search": "?foo=%7B%22abc%22",
  5841. "hash": ""
  5842. },
  5843. {
  5844. "input": "https://localhost:3000/jqueryui@1.2.3",
  5845. "base": "about:blank",
  5846. "href": "https://localhost:3000/jqueryui@1.2.3",
  5847. "origin": "https://localhost:3000",
  5848. "protocol": "https:",
  5849. "username": "",
  5850. "password": "",
  5851. "host": "localhost:3000",
  5852. "hostname": "localhost",
  5853. "port": "3000",
  5854. "pathname": "/jqueryui@1.2.3",
  5855. "search": "",
  5856. "hash": ""
  5857. },
  5858. "# tab/LF/CR",
  5859. {
  5860. "input": "h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg",
  5861. "base": "about:blank",
  5862. "href": "http://host:9000/path?query#frag",
  5863. "origin": "http://host:9000",
  5864. "protocol": "http:",
  5865. "username": "",
  5866. "password": "",
  5867. "host": "host:9000",
  5868. "hostname": "host",
  5869. "port": "9000",
  5870. "pathname": "/path",
  5871. "search": "?query",
  5872. "hash": "#frag"
  5873. },
  5874. "# Stringification of URL.searchParams",
  5875. {
  5876. "input": "?a=b&c=d",
  5877. "base": "http://example.org/foo/bar",
  5878. "href": "http://example.org/foo/bar?a=b&c=d",
  5879. "origin": "http://example.org",
  5880. "protocol": "http:",
  5881. "username": "",
  5882. "password": "",
  5883. "host": "example.org",
  5884. "hostname": "example.org",
  5885. "port": "",
  5886. "pathname": "/foo/bar",
  5887. "search": "?a=b&c=d",
  5888. "searchParams": "a=b&c=d",
  5889. "hash": ""
  5890. },
  5891. {
  5892. "input": "??a=b&c=d",
  5893. "base": "http://example.org/foo/bar",
  5894. "href": "http://example.org/foo/bar??a=b&c=d",
  5895. "origin": "http://example.org",
  5896. "protocol": "http:",
  5897. "username": "",
  5898. "password": "",
  5899. "host": "example.org",
  5900. "hostname": "example.org",
  5901. "port": "",
  5902. "pathname": "/foo/bar",
  5903. "search": "??a=b&c=d",
  5904. "searchParams": "%3Fa=b&c=d",
  5905. "hash": ""
  5906. },
  5907. "# Scheme only",
  5908. {
  5909. "input": "http:",
  5910. "base": "http://example.org/foo/bar",
  5911. "href": "http://example.org/foo/bar",
  5912. "origin": "http://example.org",
  5913. "protocol": "http:",
  5914. "username": "",
  5915. "password": "",
  5916. "host": "example.org",
  5917. "hostname": "example.org",
  5918. "port": "",
  5919. "pathname": "/foo/bar",
  5920. "search": "",
  5921. "searchParams": "",
  5922. "hash": ""
  5923. },
  5924. {
  5925. "input": "http:",
  5926. "base": "https://example.org/foo/bar",
  5927. "failure": true
  5928. },
  5929. {
  5930. "input": "sc:",
  5931. "base": "https://example.org/foo/bar",
  5932. "href": "sc:",
  5933. "origin": "null",
  5934. "protocol": "sc:",
  5935. "username": "",
  5936. "password": "",
  5937. "host": "",
  5938. "hostname": "",
  5939. "port": "",
  5940. "pathname": "",
  5941. "search": "",
  5942. "searchParams": "",
  5943. "hash": ""
  5944. },
  5945. "# Percent encoding of fragments",
  5946. {
  5947. "input": "http://foo.bar/baz?qux#foo\bbar",
  5948. "base": "about:blank",
  5949. "href": "http://foo.bar/baz?qux#foo%08bar",
  5950. "origin": "http://foo.bar",
  5951. "protocol": "http:",
  5952. "username": "",
  5953. "password": "",
  5954. "host": "foo.bar",
  5955. "hostname": "foo.bar",
  5956. "port": "",
  5957. "pathname": "/baz",
  5958. "search": "?qux",
  5959. "searchParams": "qux=",
  5960. "hash": "#foo%08bar"
  5961. },
  5962. {
  5963. "input": "http://foo.bar/baz?qux#foo\"bar",
  5964. "base": "about:blank",
  5965. "href": "http://foo.bar/baz?qux#foo%22bar",
  5966. "origin": "http://foo.bar",
  5967. "protocol": "http:",
  5968. "username": "",
  5969. "password": "",
  5970. "host": "foo.bar",
  5971. "hostname": "foo.bar",
  5972. "port": "",
  5973. "pathname": "/baz",
  5974. "search": "?qux",
  5975. "searchParams": "qux=",
  5976. "hash": "#foo%22bar"
  5977. },
  5978. {
  5979. "input": "http://foo.bar/baz?qux#foo<bar",
  5980. "base": "about:blank",
  5981. "href": "http://foo.bar/baz?qux#foo%3Cbar",
  5982. "origin": "http://foo.bar",
  5983. "protocol": "http:",
  5984. "username": "",
  5985. "password": "",
  5986. "host": "foo.bar",
  5987. "hostname": "foo.bar",
  5988. "port": "",
  5989. "pathname": "/baz",
  5990. "search": "?qux",
  5991. "searchParams": "qux=",
  5992. "hash": "#foo%3Cbar"
  5993. },
  5994. {
  5995. "input": "http://foo.bar/baz?qux#foo>bar",
  5996. "base": "about:blank",
  5997. "href": "http://foo.bar/baz?qux#foo%3Ebar",
  5998. "origin": "http://foo.bar",
  5999. "protocol": "http:",
  6000. "username": "",
  6001. "password": "",
  6002. "host": "foo.bar",
  6003. "hostname": "foo.bar",
  6004. "port": "",
  6005. "pathname": "/baz",
  6006. "search": "?qux",
  6007. "searchParams": "qux=",
  6008. "hash": "#foo%3Ebar"
  6009. },
  6010. {
  6011. "input": "http://foo.bar/baz?qux#foo`bar",
  6012. "base": "about:blank",
  6013. "href": "http://foo.bar/baz?qux#foo%60bar",
  6014. "origin": "http://foo.bar",
  6015. "protocol": "http:",
  6016. "username": "",
  6017. "password": "",
  6018. "host": "foo.bar",
  6019. "hostname": "foo.bar",
  6020. "port": "",
  6021. "pathname": "/baz",
  6022. "search": "?qux",
  6023. "searchParams": "qux=",
  6024. "hash": "#foo%60bar"
  6025. },
  6026. "# IPv4 parsing (via https://github.com/nodejs/node/pull/10317)",
  6027. {
  6028. "input": "http://1.2.3.4/",
  6029. "base": "http://other.com/",
  6030. "href": "http://1.2.3.4/",
  6031. "origin": "http://1.2.3.4",
  6032. "protocol": "http:",
  6033. "username": "",
  6034. "password": "",
  6035. "host": "1.2.3.4",
  6036. "hostname": "1.2.3.4",
  6037. "port": "",
  6038. "pathname": "/",
  6039. "search": "",
  6040. "hash": ""
  6041. },
  6042. {
  6043. "input": "http://1.2.3.4./",
  6044. "base": "http://other.com/",
  6045. "href": "http://1.2.3.4/",
  6046. "origin": "http://1.2.3.4",
  6047. "protocol": "http:",
  6048. "username": "",
  6049. "password": "",
  6050. "host": "1.2.3.4",
  6051. "hostname": "1.2.3.4",
  6052. "port": "",
  6053. "pathname": "/",
  6054. "search": "",
  6055. "hash": ""
  6056. },
  6057. {
  6058. "input": "http://192.168.257",
  6059. "base": "http://other.com/",
  6060. "href": "http://192.168.1.1/",
  6061. "origin": "http://192.168.1.1",
  6062. "protocol": "http:",
  6063. "username": "",
  6064. "password": "",
  6065. "host": "192.168.1.1",
  6066. "hostname": "192.168.1.1",
  6067. "port": "",
  6068. "pathname": "/",
  6069. "search": "",
  6070. "hash": ""
  6071. },
  6072. {
  6073. "input": "http://192.168.257.",
  6074. "base": "http://other.com/",
  6075. "href": "http://192.168.1.1/",
  6076. "origin": "http://192.168.1.1",
  6077. "protocol": "http:",
  6078. "username": "",
  6079. "password": "",
  6080. "host": "192.168.1.1",
  6081. "hostname": "192.168.1.1",
  6082. "port": "",
  6083. "pathname": "/",
  6084. "search": "",
  6085. "hash": ""
  6086. },
  6087. {
  6088. "input": "http://192.168.257.com",
  6089. "base": "http://other.com/",
  6090. "href": "http://192.168.257.com/",
  6091. "origin": "http://192.168.257.com",
  6092. "protocol": "http:",
  6093. "username": "",
  6094. "password": "",
  6095. "host": "192.168.257.com",
  6096. "hostname": "192.168.257.com",
  6097. "port": "",
  6098. "pathname": "/",
  6099. "search": "",
  6100. "hash": ""
  6101. },
  6102. {
  6103. "input": "http://256",
  6104. "base": "http://other.com/",
  6105. "href": "http://0.0.1.0/",
  6106. "origin": "http://0.0.1.0",
  6107. "protocol": "http:",
  6108. "username": "",
  6109. "password": "",
  6110. "host": "0.0.1.0",
  6111. "hostname": "0.0.1.0",
  6112. "port": "",
  6113. "pathname": "/",
  6114. "search": "",
  6115. "hash": ""
  6116. },
  6117. {
  6118. "input": "http://256.com",
  6119. "base": "http://other.com/",
  6120. "href": "http://256.com/",
  6121. "origin": "http://256.com",
  6122. "protocol": "http:",
  6123. "username": "",
  6124. "password": "",
  6125. "host": "256.com",
  6126. "hostname": "256.com",
  6127. "port": "",
  6128. "pathname": "/",
  6129. "search": "",
  6130. "hash": ""
  6131. },
  6132. {
  6133. "input": "http://999999999",
  6134. "base": "http://other.com/",
  6135. "href": "http://59.154.201.255/",
  6136. "origin": "http://59.154.201.255",
  6137. "protocol": "http:",
  6138. "username": "",
  6139. "password": "",
  6140. "host": "59.154.201.255",
  6141. "hostname": "59.154.201.255",
  6142. "port": "",
  6143. "pathname": "/",
  6144. "search": "",
  6145. "hash": ""
  6146. },
  6147. {
  6148. "input": "http://999999999.",
  6149. "base": "http://other.com/",
  6150. "href": "http://59.154.201.255/",
  6151. "origin": "http://59.154.201.255",
  6152. "protocol": "http:",
  6153. "username": "",
  6154. "password": "",
  6155. "host": "59.154.201.255",
  6156. "hostname": "59.154.201.255",
  6157. "port": "",
  6158. "pathname": "/",
  6159. "search": "",
  6160. "hash": ""
  6161. },
  6162. {
  6163. "input": "http://999999999.com",
  6164. "base": "http://other.com/",
  6165. "href": "http://999999999.com/",
  6166. "origin": "http://999999999.com",
  6167. "protocol": "http:",
  6168. "username": "",
  6169. "password": "",
  6170. "host": "999999999.com",
  6171. "hostname": "999999999.com",
  6172. "port": "",
  6173. "pathname": "/",
  6174. "search": "",
  6175. "hash": ""
  6176. },
  6177. {
  6178. "input": "http://10000000000",
  6179. "base": "http://other.com/",
  6180. "failure": true
  6181. },
  6182. {
  6183. "input": "http://10000000000.com",
  6184. "base": "http://other.com/",
  6185. "href": "http://10000000000.com/",
  6186. "origin": "http://10000000000.com",
  6187. "protocol": "http:",
  6188. "username": "",
  6189. "password": "",
  6190. "host": "10000000000.com",
  6191. "hostname": "10000000000.com",
  6192. "port": "",
  6193. "pathname": "/",
  6194. "search": "",
  6195. "hash": ""
  6196. },
  6197. {
  6198. "input": "http://4294967295",
  6199. "base": "http://other.com/",
  6200. "href": "http://255.255.255.255/",
  6201. "origin": "http://255.255.255.255",
  6202. "protocol": "http:",
  6203. "username": "",
  6204. "password": "",
  6205. "host": "255.255.255.255",
  6206. "hostname": "255.255.255.255",
  6207. "port": "",
  6208. "pathname": "/",
  6209. "search": "",
  6210. "hash": ""
  6211. },
  6212. {
  6213. "input": "http://4294967296",
  6214. "base": "http://other.com/",
  6215. "failure": true
  6216. },
  6217. {
  6218. "input": "http://0xffffffff",
  6219. "base": "http://other.com/",
  6220. "href": "http://255.255.255.255/",
  6221. "origin": "http://255.255.255.255",
  6222. "protocol": "http:",
  6223. "username": "",
  6224. "password": "",
  6225. "host": "255.255.255.255",
  6226. "hostname": "255.255.255.255",
  6227. "port": "",
  6228. "pathname": "/",
  6229. "search": "",
  6230. "hash": ""
  6231. },
  6232. {
  6233. "input": "http://0xffffffff1",
  6234. "base": "http://other.com/",
  6235. "failure": true
  6236. },
  6237. {
  6238. "input": "http://256.256.256.256",
  6239. "base": "http://other.com/",
  6240. "failure": true
  6241. },
  6242. {
  6243. "input": "https://0x.0x.0",
  6244. "base": "about:blank",
  6245. "href": "https://0.0.0.0/",
  6246. "origin": "https://0.0.0.0",
  6247. "protocol": "https:",
  6248. "username": "",
  6249. "password": "",
  6250. "host": "0.0.0.0",
  6251. "hostname": "0.0.0.0",
  6252. "port": "",
  6253. "pathname": "/",
  6254. "search": "",
  6255. "hash": ""
  6256. },
  6257. "More IPv4 parsing (via https://github.com/jsdom/whatwg-url/issues/92)",
  6258. {
  6259. "input": "https://0x100000000/test",
  6260. "base": "about:blank",
  6261. "failure": true
  6262. },
  6263. {
  6264. "input": "https://256.0.0.1/test",
  6265. "base": "about:blank",
  6266. "failure": true
  6267. },
  6268. "# file URLs containing percent-encoded Windows drive letters (shouldn't work)",
  6269. {
  6270. "input": "file:///C%3A/",
  6271. "base": "about:blank",
  6272. "href": "file:///C%3A/",
  6273. "protocol": "file:",
  6274. "username": "",
  6275. "password": "",
  6276. "host": "",
  6277. "hostname": "",
  6278. "port": "",
  6279. "pathname": "/C%3A/",
  6280. "search": "",
  6281. "hash": ""
  6282. },
  6283. {
  6284. "input": "file:///C%7C/",
  6285. "base": "about:blank",
  6286. "href": "file:///C%7C/",
  6287. "protocol": "file:",
  6288. "username": "",
  6289. "password": "",
  6290. "host": "",
  6291. "hostname": "",
  6292. "port": "",
  6293. "pathname": "/C%7C/",
  6294. "search": "",
  6295. "hash": ""
  6296. },
  6297. {
  6298. "input": "file://%43%3A",
  6299. "base": "about:blank",
  6300. "failure": true
  6301. },
  6302. {
  6303. "input": "asdf://%43%7C/",
  6304. "base": "about:blank",
  6305. "href": "asdf://%43%7C/",
  6306. "origin": "null",
  6307. "protocol": "asdf:",
  6308. "username": "",
  6309. "password": "",
  6310. "host": "%43%7C",
  6311. "hostname": "%43%7C",
  6312. "port": "",
  6313. "pathname": "/",
  6314. "search": "",
  6315. "hash": ""
  6316. },
  6317. "# file URLs relative to other file URLs (via https://github.com/jsdom/whatwg-url/pull/60)",
  6318. {
  6319. "input": "pix/submit.gif",
  6320. "base": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html",
  6321. "href": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",
  6322. "protocol": "file:",
  6323. "username": "",
  6324. "password": "",
  6325. "host": "",
  6326. "hostname": "",
  6327. "port": "",
  6328. "pathname": "/C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",
  6329. "search": "",
  6330. "hash": ""
  6331. },
  6332. {
  6333. "input": "..",
  6334. "base": "file:///C:/",
  6335. "href": "file:///C:/",
  6336. "protocol": "file:",
  6337. "username": "",
  6338. "password": "",
  6339. "host": "",
  6340. "hostname": "",
  6341. "port": "",
  6342. "pathname": "/C:/",
  6343. "search": "",
  6344. "hash": ""
  6345. },
  6346. {
  6347. "input": "..",
  6348. "base": "file:///",
  6349. "href": "file:///",
  6350. "protocol": "file:",
  6351. "username": "",
  6352. "password": "",
  6353. "host": "",
  6354. "hostname": "",
  6355. "port": "",
  6356. "pathname": "/",
  6357. "search": "",
  6358. "hash": ""
  6359. },
  6360. "# More file URL tests by zcorpan and annevk",
  6361. {
  6362. "input": "/",
  6363. "base": "file:///C:/a/b",
  6364. "href": "file:///C:/",
  6365. "protocol": "file:",
  6366. "username": "",
  6367. "password": "",
  6368. "host": "",
  6369. "hostname": "",
  6370. "port": "",
  6371. "pathname": "/C:/",
  6372. "search": "",
  6373. "hash": ""
  6374. },
  6375. {
  6376. "input": "/",
  6377. "base": "file://h/a/b",
  6378. "href": "file://h/",
  6379. "protocol": "file:",
  6380. "username": "",
  6381. "password": "",
  6382. "host": "h",
  6383. "hostname": "h",
  6384. "port": "",
  6385. "pathname": "/",
  6386. "search": "",
  6387. "hash": ""
  6388. },
  6389. {
  6390. "input": "//d:",
  6391. "base": "file:///C:/a/b",
  6392. "href": "file:///d:",
  6393. "protocol": "file:",
  6394. "username": "",
  6395. "password": "",
  6396. "host": "",
  6397. "hostname": "",
  6398. "port": "",
  6399. "pathname": "/d:",
  6400. "search": "",
  6401. "hash": ""
  6402. },
  6403. {
  6404. "input": "//d:/..",
  6405. "base": "file:///C:/a/b",
  6406. "href": "file:///d:/",
  6407. "protocol": "file:",
  6408. "username": "",
  6409. "password": "",
  6410. "host": "",
  6411. "hostname": "",
  6412. "port": "",
  6413. "pathname": "/d:/",
  6414. "search": "",
  6415. "hash": ""
  6416. },
  6417. {
  6418. "input": "..",
  6419. "base": "file:///ab:/",
  6420. "href": "file:///",
  6421. "protocol": "file:",
  6422. "username": "",
  6423. "password": "",
  6424. "host": "",
  6425. "hostname": "",
  6426. "port": "",
  6427. "pathname": "/",
  6428. "search": "",
  6429. "hash": ""
  6430. },
  6431. {
  6432. "input": "..",
  6433. "base": "file:///1:/",
  6434. "href": "file:///",
  6435. "protocol": "file:",
  6436. "username": "",
  6437. "password": "",
  6438. "host": "",
  6439. "hostname": "",
  6440. "port": "",
  6441. "pathname": "/",
  6442. "search": "",
  6443. "hash": ""
  6444. },
  6445. {
  6446. "input": "",
  6447. "base": "file:///test?test#test",
  6448. "href": "file:///test?test",
  6449. "protocol": "file:",
  6450. "username": "",
  6451. "password": "",
  6452. "host": "",
  6453. "hostname": "",
  6454. "port": "",
  6455. "pathname": "/test",
  6456. "search": "?test",
  6457. "hash": ""
  6458. },
  6459. {
  6460. "input": "file:",
  6461. "base": "file:///test?test#test",
  6462. "href": "file:///test?test",
  6463. "protocol": "file:",
  6464. "username": "",
  6465. "password": "",
  6466. "host": "",
  6467. "hostname": "",
  6468. "port": "",
  6469. "pathname": "/test",
  6470. "search": "?test",
  6471. "hash": ""
  6472. },
  6473. {
  6474. "input": "?x",
  6475. "base": "file:///test?test#test",
  6476. "href": "file:///test?x",
  6477. "protocol": "file:",
  6478. "username": "",
  6479. "password": "",
  6480. "host": "",
  6481. "hostname": "",
  6482. "port": "",
  6483. "pathname": "/test",
  6484. "search": "?x",
  6485. "hash": ""
  6486. },
  6487. {
  6488. "input": "file:?x",
  6489. "base": "file:///test?test#test",
  6490. "href": "file:///test?x",
  6491. "protocol": "file:",
  6492. "username": "",
  6493. "password": "",
  6494. "host": "",
  6495. "hostname": "",
  6496. "port": "",
  6497. "pathname": "/test",
  6498. "search": "?x",
  6499. "hash": ""
  6500. },
  6501. {
  6502. "input": "#x",
  6503. "base": "file:///test?test#test",
  6504. "href": "file:///test?test#x",
  6505. "protocol": "file:",
  6506. "username": "",
  6507. "password": "",
  6508. "host": "",
  6509. "hostname": "",
  6510. "port": "",
  6511. "pathname": "/test",
  6512. "search": "?test",
  6513. "hash": "#x"
  6514. },
  6515. {
  6516. "input": "file:#x",
  6517. "base": "file:///test?test#test",
  6518. "href": "file:///test?test#x",
  6519. "protocol": "file:",
  6520. "username": "",
  6521. "password": "",
  6522. "host": "",
  6523. "hostname": "",
  6524. "port": "",
  6525. "pathname": "/test",
  6526. "search": "?test",
  6527. "hash": "#x"
  6528. },
  6529. "# File URLs and many (back)slashes",
  6530. {
  6531. "input": "file:///localhost//cat",
  6532. "base": "about:blank",
  6533. "href": "file:///localhost//cat",
  6534. "protocol": "file:",
  6535. "username": "",
  6536. "password": "",
  6537. "host": "",
  6538. "hostname": "",
  6539. "port": "",
  6540. "pathname": "/localhost//cat",
  6541. "search": "",
  6542. "hash": ""
  6543. },
  6544. {
  6545. "input": "\\//pig",
  6546. "base": "file://lion/",
  6547. "href": "file:///pig",
  6548. "protocol": "file:",
  6549. "username": "",
  6550. "password": "",
  6551. "host": "",
  6552. "hostname": "",
  6553. "port": "",
  6554. "pathname": "/pig",
  6555. "search": "",
  6556. "hash": ""
  6557. },
  6558. {
  6559. "input": "file://",
  6560. "base": "file://ape/",
  6561. "href": "file:///",
  6562. "protocol": "file:",
  6563. "username": "",
  6564. "password": "",
  6565. "host": "",
  6566. "hostname": "",
  6567. "port": "",
  6568. "pathname": "/",
  6569. "search": "",
  6570. "hash": ""
  6571. },
  6572. "# File URLs with non-empty hosts",
  6573. {
  6574. "input": "/rooibos",
  6575. "base": "file://tea/",
  6576. "href": "file://tea/rooibos",
  6577. "protocol": "file:",
  6578. "username": "",
  6579. "password": "",
  6580. "host": "tea",
  6581. "hostname": "tea",
  6582. "port": "",
  6583. "pathname": "/rooibos",
  6584. "search": "",
  6585. "hash": ""
  6586. },
  6587. {
  6588. "input": "/?chai",
  6589. "base": "file://tea/",
  6590. "href": "file://tea/?chai",
  6591. "protocol": "file:",
  6592. "username": "",
  6593. "password": "",
  6594. "host": "tea",
  6595. "hostname": "tea",
  6596. "port": "",
  6597. "pathname": "/",
  6598. "search": "?chai",
  6599. "hash": ""
  6600. },
  6601. "# Windows drive letter handling with the 'file:' base URL",
  6602. {
  6603. "input": "C",
  6604. "base": "file://host/dir/file",
  6605. "href": "file://host/dir/C",
  6606. "protocol": "file:",
  6607. "username": "",
  6608. "password": "",
  6609. "host": "host",
  6610. "hostname": "host",
  6611. "port": "",
  6612. "pathname": "/dir/C",
  6613. "search": "",
  6614. "hash": ""
  6615. },
  6616. {
  6617. "input": "C|a",
  6618. "base": "file://host/dir/file",
  6619. "href": "file://host/dir/C|a",
  6620. "protocol": "file:",
  6621. "username": "",
  6622. "password": "",
  6623. "host": "host",
  6624. "hostname": "host",
  6625. "port": "",
  6626. "pathname": "/dir/C|a",
  6627. "search": "",
  6628. "hash": ""
  6629. },
  6630. "# Windows drive letter quirk in the file slash state",
  6631. {
  6632. "input": "/c:/foo/bar",
  6633. "base": "file:///c:/baz/qux",
  6634. "href": "file:///c:/foo/bar",
  6635. "protocol": "file:",
  6636. "username": "",
  6637. "password": "",
  6638. "host": "",
  6639. "hostname": "",
  6640. "port": "",
  6641. "pathname": "/c:/foo/bar",
  6642. "search": "",
  6643. "hash": ""
  6644. },
  6645. {
  6646. "input": "/c|/foo/bar",
  6647. "base": "file:///c:/baz/qux",
  6648. "href": "file:///c:/foo/bar",
  6649. "protocol": "file:",
  6650. "username": "",
  6651. "password": "",
  6652. "host": "",
  6653. "hostname": "",
  6654. "port": "",
  6655. "pathname": "/c:/foo/bar",
  6656. "search": "",
  6657. "hash": ""
  6658. },
  6659. {
  6660. "input": "file:\\c:\\foo\\bar",
  6661. "base": "file:///c:/baz/qux",
  6662. "href": "file:///c:/foo/bar",
  6663. "protocol": "file:",
  6664. "username": "",
  6665. "password": "",
  6666. "host": "",
  6667. "hostname": "",
  6668. "port": "",
  6669. "pathname": "/c:/foo/bar",
  6670. "search": "",
  6671. "hash": ""
  6672. },
  6673. "# Copy the empty host from the input in the following cases",
  6674. {
  6675. "input": "//C:/",
  6676. "base": "file://host/",
  6677. "href": "file:///C:/",
  6678. "protocol": "file:",
  6679. "username": "",
  6680. "password": "",
  6681. "host": "",
  6682. "hostname": "",
  6683. "port": "",
  6684. "pathname": "/C:/",
  6685. "search": "",
  6686. "hash": ""
  6687. },
  6688. {
  6689. "input": "file://C:/",
  6690. "base": "file://host/",
  6691. "href": "file:///C:/",
  6692. "protocol": "file:",
  6693. "username": "",
  6694. "password": "",
  6695. "host": "",
  6696. "hostname": "",
  6697. "port": "",
  6698. "pathname": "/C:/",
  6699. "search": "",
  6700. "hash": ""
  6701. },
  6702. {
  6703. "input": "///C:/",
  6704. "base": "file://host/",
  6705. "href": "file:///C:/",
  6706. "protocol": "file:",
  6707. "username": "",
  6708. "password": "",
  6709. "host": "",
  6710. "hostname": "",
  6711. "port": "",
  6712. "pathname": "/C:/",
  6713. "search": "",
  6714. "hash": ""
  6715. },
  6716. {
  6717. "input": "file:///C:/",
  6718. "base": "file://host/",
  6719. "href": "file:///C:/",
  6720. "protocol": "file:",
  6721. "username": "",
  6722. "password": "",
  6723. "host": "",
  6724. "hostname": "",
  6725. "port": "",
  6726. "pathname": "/C:/",
  6727. "search": "",
  6728. "hash": ""
  6729. },
  6730. "# Windows drive letter quirk (no host)",
  6731. {
  6732. "input": "file:/C|/",
  6733. "base": "about:blank",
  6734. "href": "file:///C:/",
  6735. "protocol": "file:",
  6736. "username": "",
  6737. "password": "",
  6738. "host": "",
  6739. "hostname": "",
  6740. "port": "",
  6741. "pathname": "/C:/",
  6742. "search": "",
  6743. "hash": ""
  6744. },
  6745. {
  6746. "input": "file://C|/",
  6747. "base": "about:blank",
  6748. "href": "file:///C:/",
  6749. "protocol": "file:",
  6750. "username": "",
  6751. "password": "",
  6752. "host": "",
  6753. "hostname": "",
  6754. "port": "",
  6755. "pathname": "/C:/",
  6756. "search": "",
  6757. "hash": ""
  6758. },
  6759. "# file URLs without base URL by Rimas Misevičius",
  6760. {
  6761. "input": "file:",
  6762. "base": "about:blank",
  6763. "href": "file:///",
  6764. "protocol": "file:",
  6765. "username": "",
  6766. "password": "",
  6767. "host": "",
  6768. "hostname": "",
  6769. "port": "",
  6770. "pathname": "/",
  6771. "search": "",
  6772. "hash": ""
  6773. },
  6774. {
  6775. "input": "file:?q=v",
  6776. "base": "about:blank",
  6777. "href": "file:///?q=v",
  6778. "protocol": "file:",
  6779. "username": "",
  6780. "password": "",
  6781. "host": "",
  6782. "hostname": "",
  6783. "port": "",
  6784. "pathname": "/",
  6785. "search": "?q=v",
  6786. "hash": ""
  6787. },
  6788. {
  6789. "input": "file:#frag",
  6790. "base": "about:blank",
  6791. "href": "file:///#frag",
  6792. "protocol": "file:",
  6793. "username": "",
  6794. "password": "",
  6795. "host": "",
  6796. "hostname": "",
  6797. "port": "",
  6798. "pathname": "/",
  6799. "search": "",
  6800. "hash": "#frag"
  6801. },
  6802. "# file: drive letter cases from https://crbug.com/1078698",
  6803. {
  6804. "input": "file:///Y:",
  6805. "base": "about:blank",
  6806. "href": "file:///Y:",
  6807. "protocol": "file:",
  6808. "username": "",
  6809. "password": "",
  6810. "host": "",
  6811. "hostname": "",
  6812. "port": "",
  6813. "pathname": "/Y:",
  6814. "search": "",
  6815. "hash": ""
  6816. },
  6817. {
  6818. "input": "file:///Y:/",
  6819. "base": "about:blank",
  6820. "href": "file:///Y:/",
  6821. "protocol": "file:",
  6822. "username": "",
  6823. "password": "",
  6824. "host": "",
  6825. "hostname": "",
  6826. "port": "",
  6827. "pathname": "/Y:/",
  6828. "search": "",
  6829. "hash": ""
  6830. },
  6831. {
  6832. "input": "file:///./Y",
  6833. "base": "about:blank",
  6834. "href": "file:///Y",
  6835. "protocol": "file:",
  6836. "username": "",
  6837. "password": "",
  6838. "host": "",
  6839. "hostname": "",
  6840. "port": "",
  6841. "pathname": "/Y",
  6842. "search": "",
  6843. "hash": ""
  6844. },
  6845. {
  6846. "input": "file:///./Y:",
  6847. "base": "about:blank",
  6848. "href": "file:///Y:",
  6849. "protocol": "file:",
  6850. "username": "",
  6851. "password": "",
  6852. "host": "",
  6853. "hostname": "",
  6854. "port": "",
  6855. "pathname": "/Y:",
  6856. "search": "",
  6857. "hash": ""
  6858. },
  6859. {
  6860. "input": "\\\\\\.\\Y:",
  6861. "base": "about:blank",
  6862. "failure": true,
  6863. "inputCanBeRelative": true
  6864. },
  6865. "# file: drive letter cases from https://crbug.com/1078698 but lowercased",
  6866. {
  6867. "input": "file:///y:",
  6868. "base": "about:blank",
  6869. "href": "file:///y:",
  6870. "protocol": "file:",
  6871. "username": "",
  6872. "password": "",
  6873. "host": "",
  6874. "hostname": "",
  6875. "port": "",
  6876. "pathname": "/y:",
  6877. "search": "",
  6878. "hash": ""
  6879. },
  6880. {
  6881. "input": "file:///y:/",
  6882. "base": "about:blank",
  6883. "href": "file:///y:/",
  6884. "protocol": "file:",
  6885. "username": "",
  6886. "password": "",
  6887. "host": "",
  6888. "hostname": "",
  6889. "port": "",
  6890. "pathname": "/y:/",
  6891. "search": "",
  6892. "hash": ""
  6893. },
  6894. {
  6895. "input": "file:///./y",
  6896. "base": "about:blank",
  6897. "href": "file:///y",
  6898. "protocol": "file:",
  6899. "username": "",
  6900. "password": "",
  6901. "host": "",
  6902. "hostname": "",
  6903. "port": "",
  6904. "pathname": "/y",
  6905. "search": "",
  6906. "hash": ""
  6907. },
  6908. {
  6909. "input": "file:///./y:",
  6910. "base": "about:blank",
  6911. "href": "file:///y:",
  6912. "protocol": "file:",
  6913. "username": "",
  6914. "password": "",
  6915. "host": "",
  6916. "hostname": "",
  6917. "port": "",
  6918. "pathname": "/y:",
  6919. "search": "",
  6920. "hash": ""
  6921. },
  6922. {
  6923. "input": "\\\\\\.\\y:",
  6924. "base": "about:blank",
  6925. "failure": true,
  6926. "inputCanBeRelative": true
  6927. },
  6928. "# Additional file URL tests for (https://github.com/whatwg/url/issues/405)",
  6929. {
  6930. "input": "file:///one/two",
  6931. "base": "file:///",
  6932. "href": "file:///one/two",
  6933. "protocol": "file:",
  6934. "username": "",
  6935. "password": "",
  6936. "host": "",
  6937. "hostname": "",
  6938. "port": "",
  6939. "pathname": "/one/two",
  6940. "search": "",
  6941. "hash": ""
  6942. },
  6943. {
  6944. "input": "//one/two",
  6945. "base": "file:///",
  6946. "href": "file://one/two",
  6947. "protocol": "file:",
  6948. "username": "",
  6949. "password": "",
  6950. "host": "one",
  6951. "hostname": "one",
  6952. "port": "",
  6953. "pathname": "/two",
  6954. "search": "",
  6955. "hash": ""
  6956. },
  6957. {
  6958. "input": "///one/two",
  6959. "base": "file:///",
  6960. "href": "file:///one/two",
  6961. "protocol": "file:",
  6962. "username": "",
  6963. "password": "",
  6964. "host": "",
  6965. "hostname": "",
  6966. "port": "",
  6967. "pathname": "/one/two",
  6968. "search": "",
  6969. "hash": ""
  6970. },
  6971. "# IPv6 tests",
  6972. {
  6973. "input": "http://[1:0::]",
  6974. "base": "http://example.net/",
  6975. "href": "http://[1::]/",
  6976. "origin": "http://[1::]",
  6977. "protocol": "http:",
  6978. "username": "",
  6979. "password": "",
  6980. "host": "[1::]",
  6981. "hostname": "[1::]",
  6982. "port": "",
  6983. "pathname": "/",
  6984. "search": "",
  6985. "hash": ""
  6986. },
  6987. {
  6988. "input": "http://[0:1:2:3:4:5:6:7:8]",
  6989. "base": "http://example.net/",
  6990. "failure": true
  6991. },
  6992. {
  6993. "input": "https://[0::0::0]",
  6994. "base": "about:blank",
  6995. "failure": true
  6996. },
  6997. {
  6998. "input": "https://[0:.0]",
  6999. "base": "about:blank",
  7000. "failure": true
  7001. },
  7002. {
  7003. "input": "https://[0:0:]",
  7004. "base": "about:blank",
  7005. "failure": true
  7006. },
  7007. {
  7008. "input": "https://[0:1:2:3:4:5:6:7.0.0.0.1]",
  7009. "base": "about:blank",
  7010. "failure": true
  7011. },
  7012. {
  7013. "input": "https://[0:1.00.0.0.0]",
  7014. "base": "about:blank",
  7015. "failure": true
  7016. },
  7017. {
  7018. "input": "https://[0:1.290.0.0.0]",
  7019. "base": "about:blank",
  7020. "failure": true
  7021. },
  7022. {
  7023. "input": "https://[0:1.23.23]",
  7024. "base": "about:blank",
  7025. "failure": true
  7026. },
  7027. "# Empty host",
  7028. {
  7029. "input": "http://?",
  7030. "base": "about:blank",
  7031. "failure": true
  7032. },
  7033. {
  7034. "input": "http://#",
  7035. "base": "about:blank",
  7036. "failure": true
  7037. },
  7038. "Port overflow (2^32 + 81)",
  7039. {
  7040. "input": "http://f:4294967377/c",
  7041. "base": "http://example.org/",
  7042. "failure": true
  7043. },
  7044. "Port overflow (2^64 + 81)",
  7045. {
  7046. "input": "http://f:18446744073709551697/c",
  7047. "base": "http://example.org/",
  7048. "failure": true
  7049. },
  7050. "Port overflow (2^128 + 81)",
  7051. {
  7052. "input": "http://f:340282366920938463463374607431768211537/c",
  7053. "base": "http://example.org/",
  7054. "failure": true
  7055. },
  7056. "# Non-special-URL path tests",
  7057. {
  7058. "input": "sc://ñ",
  7059. "base": "about:blank",
  7060. "href": "sc://%C3%B1",
  7061. "origin": "null",
  7062. "protocol": "sc:",
  7063. "username": "",
  7064. "password": "",
  7065. "host": "%C3%B1",
  7066. "hostname": "%C3%B1",
  7067. "port": "",
  7068. "pathname": "",
  7069. "search": "",
  7070. "hash": ""
  7071. },
  7072. {
  7073. "input": "sc://ñ?x",
  7074. "base": "about:blank",
  7075. "href": "sc://%C3%B1?x",
  7076. "origin": "null",
  7077. "protocol": "sc:",
  7078. "username": "",
  7079. "password": "",
  7080. "host": "%C3%B1",
  7081. "hostname": "%C3%B1",
  7082. "port": "",
  7083. "pathname": "",
  7084. "search": "?x",
  7085. "hash": ""
  7086. },
  7087. {
  7088. "input": "sc://ñ#x",
  7089. "base": "about:blank",
  7090. "href": "sc://%C3%B1#x",
  7091. "origin": "null",
  7092. "protocol": "sc:",
  7093. "username": "",
  7094. "password": "",
  7095. "host": "%C3%B1",
  7096. "hostname": "%C3%B1",
  7097. "port": "",
  7098. "pathname": "",
  7099. "search": "",
  7100. "hash": "#x"
  7101. },
  7102. {
  7103. "input": "#x",
  7104. "base": "sc://ñ",
  7105. "href": "sc://%C3%B1#x",
  7106. "origin": "null",
  7107. "protocol": "sc:",
  7108. "username": "",
  7109. "password": "",
  7110. "host": "%C3%B1",
  7111. "hostname": "%C3%B1",
  7112. "port": "",
  7113. "pathname": "",
  7114. "search": "",
  7115. "hash": "#x"
  7116. },
  7117. {
  7118. "input": "?x",
  7119. "base": "sc://ñ",
  7120. "href": "sc://%C3%B1?x",
  7121. "origin": "null",
  7122. "protocol": "sc:",
  7123. "username": "",
  7124. "password": "",
  7125. "host": "%C3%B1",
  7126. "hostname": "%C3%B1",
  7127. "port": "",
  7128. "pathname": "",
  7129. "search": "?x",
  7130. "hash": ""
  7131. },
  7132. {
  7133. "input": "sc://?",
  7134. "base": "about:blank",
  7135. "href": "sc://?",
  7136. "protocol": "sc:",
  7137. "username": "",
  7138. "password": "",
  7139. "host": "",
  7140. "hostname": "",
  7141. "port": "",
  7142. "pathname": "",
  7143. "search": "",
  7144. "hash": ""
  7145. },
  7146. {
  7147. "input": "sc://#",
  7148. "base": "about:blank",
  7149. "href": "sc://#",
  7150. "protocol": "sc:",
  7151. "username": "",
  7152. "password": "",
  7153. "host": "",
  7154. "hostname": "",
  7155. "port": "",
  7156. "pathname": "",
  7157. "search": "",
  7158. "hash": ""
  7159. },
  7160. {
  7161. "input": "///",
  7162. "base": "sc://x/",
  7163. "href": "sc:///",
  7164. "protocol": "sc:",
  7165. "username": "",
  7166. "password": "",
  7167. "host": "",
  7168. "hostname": "",
  7169. "port": "",
  7170. "pathname": "/",
  7171. "search": "",
  7172. "hash": ""
  7173. },
  7174. {
  7175. "input": "////",
  7176. "base": "sc://x/",
  7177. "href": "sc:////",
  7178. "protocol": "sc:",
  7179. "username": "",
  7180. "password": "",
  7181. "host": "",
  7182. "hostname": "",
  7183. "port": "",
  7184. "pathname": "//",
  7185. "search": "",
  7186. "hash": ""
  7187. },
  7188. {
  7189. "input": "////x/",
  7190. "base": "sc://x/",
  7191. "href": "sc:////x/",
  7192. "protocol": "sc:",
  7193. "username": "",
  7194. "password": "",
  7195. "host": "",
  7196. "hostname": "",
  7197. "port": "",
  7198. "pathname": "//x/",
  7199. "search": "",
  7200. "hash": ""
  7201. },
  7202. {
  7203. "input": "tftp://foobar.com/someconfig;mode=netascii",
  7204. "base": "about:blank",
  7205. "href": "tftp://foobar.com/someconfig;mode=netascii",
  7206. "origin": "null",
  7207. "protocol": "tftp:",
  7208. "username": "",
  7209. "password": "",
  7210. "host": "foobar.com",
  7211. "hostname": "foobar.com",
  7212. "port": "",
  7213. "pathname": "/someconfig;mode=netascii",
  7214. "search": "",
  7215. "hash": ""
  7216. },
  7217. {
  7218. "input": "telnet://user:pass@foobar.com:23/",
  7219. "base": "about:blank",
  7220. "href": "telnet://user:pass@foobar.com:23/",
  7221. "origin": "null",
  7222. "protocol": "telnet:",
  7223. "username": "user",
  7224. "password": "pass",
  7225. "host": "foobar.com:23",
  7226. "hostname": "foobar.com",
  7227. "port": "23",
  7228. "pathname": "/",
  7229. "search": "",
  7230. "hash": ""
  7231. },
  7232. {
  7233. "input": "ut2004://10.10.10.10:7777/Index.ut2",
  7234. "base": "about:blank",
  7235. "href": "ut2004://10.10.10.10:7777/Index.ut2",
  7236. "origin": "null",
  7237. "protocol": "ut2004:",
  7238. "username": "",
  7239. "password": "",
  7240. "host": "10.10.10.10:7777",
  7241. "hostname": "10.10.10.10",
  7242. "port": "7777",
  7243. "pathname": "/Index.ut2",
  7244. "search": "",
  7245. "hash": ""
  7246. },
  7247. {
  7248. "input": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",
  7249. "base": "about:blank",
  7250. "href": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",
  7251. "origin": "null",
  7252. "protocol": "redis:",
  7253. "username": "foo",
  7254. "password": "bar",
  7255. "host": "somehost:6379",
  7256. "hostname": "somehost",
  7257. "port": "6379",
  7258. "pathname": "/0",
  7259. "search": "?baz=bam&qux=baz",
  7260. "hash": ""
  7261. },
  7262. {
  7263. "input": "rsync://foo@host:911/sup",
  7264. "base": "about:blank",
  7265. "href": "rsync://foo@host:911/sup",
  7266. "origin": "null",
  7267. "protocol": "rsync:",
  7268. "username": "foo",
  7269. "password": "",
  7270. "host": "host:911",
  7271. "hostname": "host",
  7272. "port": "911",
  7273. "pathname": "/sup",
  7274. "search": "",
  7275. "hash": ""
  7276. },
  7277. {
  7278. "input": "git://github.com/foo/bar.git",
  7279. "base": "about:blank",
  7280. "href": "git://github.com/foo/bar.git",
  7281. "origin": "null",
  7282. "protocol": "git:",
  7283. "username": "",
  7284. "password": "",
  7285. "host": "github.com",
  7286. "hostname": "github.com",
  7287. "port": "",
  7288. "pathname": "/foo/bar.git",
  7289. "search": "",
  7290. "hash": ""
  7291. },
  7292. {
  7293. "input": "irc://myserver.com:6999/channel?passwd",
  7294. "base": "about:blank",
  7295. "href": "irc://myserver.com:6999/channel?passwd",
  7296. "origin": "null",
  7297. "protocol": "irc:",
  7298. "username": "",
  7299. "password": "",
  7300. "host": "myserver.com:6999",
  7301. "hostname": "myserver.com",
  7302. "port": "6999",
  7303. "pathname": "/channel",
  7304. "search": "?passwd",
  7305. "hash": ""
  7306. },
  7307. {
  7308. "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT",
  7309. "base": "about:blank",
  7310. "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT",
  7311. "origin": "null",
  7312. "protocol": "dns:",
  7313. "username": "",
  7314. "password": "",
  7315. "host": "fw.example.org:9999",
  7316. "hostname": "fw.example.org",
  7317. "port": "9999",
  7318. "pathname": "/foo.bar.org",
  7319. "search": "?type=TXT",
  7320. "hash": ""
  7321. },
  7322. {
  7323. "input": "ldap://localhost:389/ou=People,o=JNDITutorial",
  7324. "base": "about:blank",
  7325. "href": "ldap://localhost:389/ou=People,o=JNDITutorial",
  7326. "origin": "null",
  7327. "protocol": "ldap:",
  7328. "username": "",
  7329. "password": "",
  7330. "host": "localhost:389",
  7331. "hostname": "localhost",
  7332. "port": "389",
  7333. "pathname": "/ou=People,o=JNDITutorial",
  7334. "search": "",
  7335. "hash": ""
  7336. },
  7337. {
  7338. "input": "git+https://github.com/foo/bar",
  7339. "base": "about:blank",
  7340. "href": "git+https://github.com/foo/bar",
  7341. "origin": "null",
  7342. "protocol": "git+https:",
  7343. "username": "",
  7344. "password": "",
  7345. "host": "github.com",
  7346. "hostname": "github.com",
  7347. "port": "",
  7348. "pathname": "/foo/bar",
  7349. "search": "",
  7350. "hash": ""
  7351. },
  7352. {
  7353. "input": "urn:ietf:rfc:2648",
  7354. "base": "about:blank",
  7355. "href": "urn:ietf:rfc:2648",
  7356. "origin": "null",
  7357. "protocol": "urn:",
  7358. "username": "",
  7359. "password": "",
  7360. "host": "",
  7361. "hostname": "",
  7362. "port": "",
  7363. "pathname": "ietf:rfc:2648",
  7364. "search": "",
  7365. "hash": ""
  7366. },
  7367. {
  7368. "input": "tag:joe@example.org,2001:foo/bar",
  7369. "base": "about:blank",
  7370. "href": "tag:joe@example.org,2001:foo/bar",
  7371. "origin": "null",
  7372. "protocol": "tag:",
  7373. "username": "",
  7374. "password": "",
  7375. "host": "",
  7376. "hostname": "",
  7377. "port": "",
  7378. "pathname": "joe@example.org,2001:foo/bar",
  7379. "search": "",
  7380. "hash": ""
  7381. },
  7382. "# percent encoded hosts in non-special-URLs",
  7383. {
  7384. "input": "non-special://%E2%80%A0/",
  7385. "base": "about:blank",
  7386. "href": "non-special://%E2%80%A0/",
  7387. "protocol": "non-special:",
  7388. "username": "",
  7389. "password": "",
  7390. "host": "%E2%80%A0",
  7391. "hostname": "%E2%80%A0",
  7392. "port": "",
  7393. "pathname": "/",
  7394. "search": "",
  7395. "hash": ""
  7396. },
  7397. {
  7398. "input": "non-special://H%4fSt/path",
  7399. "base": "about:blank",
  7400. "href": "non-special://H%4fSt/path",
  7401. "protocol": "non-special:",
  7402. "username": "",
  7403. "password": "",
  7404. "host": "H%4fSt",
  7405. "hostname": "H%4fSt",
  7406. "port": "",
  7407. "pathname": "/path",
  7408. "search": "",
  7409. "hash": ""
  7410. },
  7411. "# IPv6 in non-special-URLs",
  7412. {
  7413. "input": "non-special://[1:2:0:0:5:0:0:0]/",
  7414. "base": "about:blank",
  7415. "href": "non-special://[1:2:0:0:5::]/",
  7416. "protocol": "non-special:",
  7417. "username": "",
  7418. "password": "",
  7419. "host": "[1:2:0:0:5::]",
  7420. "hostname": "[1:2:0:0:5::]",
  7421. "port": "",
  7422. "pathname": "/",
  7423. "search": "",
  7424. "hash": ""
  7425. },
  7426. {
  7427. "input": "non-special://[1:2:0:0:0:0:0:3]/",
  7428. "base": "about:blank",
  7429. "href": "non-special://[1:2::3]/",
  7430. "protocol": "non-special:",
  7431. "username": "",
  7432. "password": "",
  7433. "host": "[1:2::3]",
  7434. "hostname": "[1:2::3]",
  7435. "port": "",
  7436. "pathname": "/",
  7437. "search": "",
  7438. "hash": ""
  7439. },
  7440. {
  7441. "input": "non-special://[1:2::3]:80/",
  7442. "base": "about:blank",
  7443. "href": "non-special://[1:2::3]:80/",
  7444. "protocol": "non-special:",
  7445. "username": "",
  7446. "password": "",
  7447. "host": "[1:2::3]:80",
  7448. "hostname": "[1:2::3]",
  7449. "port": "80",
  7450. "pathname": "/",
  7451. "search": "",
  7452. "hash": ""
  7453. },
  7454. {
  7455. "input": "non-special://[:80/",
  7456. "base": "about:blank",
  7457. "failure": true
  7458. },
  7459. {
  7460. "input": "blob:https://example.com:443/",
  7461. "base": "about:blank",
  7462. "href": "blob:https://example.com:443/",
  7463. "origin": "https://example.com",
  7464. "protocol": "blob:",
  7465. "username": "",
  7466. "password": "",
  7467. "host": "",
  7468. "hostname": "",
  7469. "port": "",
  7470. "pathname": "https://example.com:443/",
  7471. "search": "",
  7472. "hash": ""
  7473. },
  7474. {
  7475. "input": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
  7476. "base": "about:blank",
  7477. "href": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
  7478. "origin": "null",
  7479. "protocol": "blob:",
  7480. "username": "",
  7481. "password": "",
  7482. "host": "",
  7483. "hostname": "",
  7484. "port": "",
  7485. "pathname": "d3958f5c-0777-0845-9dcf-2cb28783acaf",
  7486. "search": "",
  7487. "hash": ""
  7488. },
  7489. {
  7490. "input": "blob:",
  7491. "base": "about:blank",
  7492. "href": "blob:",
  7493. "origin": "null",
  7494. "protocol": "blob:",
  7495. "username": "",
  7496. "password": "",
  7497. "host": "",
  7498. "hostname": "",
  7499. "port": "",
  7500. "pathname": "",
  7501. "search": "",
  7502. "hash": ""
  7503. },
  7504. "Invalid IPv4 radix digits",
  7505. {
  7506. "input": "http://0x7f.0.0.0x7g",
  7507. "base": "about:blank",
  7508. "href": "http://0x7f.0.0.0x7g/",
  7509. "protocol": "http:",
  7510. "username": "",
  7511. "password": "",
  7512. "host": "0x7f.0.0.0x7g",
  7513. "hostname": "0x7f.0.0.0x7g",
  7514. "port": "",
  7515. "pathname": "/",
  7516. "search": "",
  7517. "hash": ""
  7518. },
  7519. {
  7520. "input": "http://0X7F.0.0.0X7G",
  7521. "base": "about:blank",
  7522. "href": "http://0x7f.0.0.0x7g/",
  7523. "protocol": "http:",
  7524. "username": "",
  7525. "password": "",
  7526. "host": "0x7f.0.0.0x7g",
  7527. "hostname": "0x7f.0.0.0x7g",
  7528. "port": "",
  7529. "pathname": "/",
  7530. "search": "",
  7531. "hash": ""
  7532. },
  7533. "Invalid IPv4 portion of IPv6 address",
  7534. {
  7535. "input": "http://[::127.0.0.0.1]",
  7536. "base": "about:blank",
  7537. "failure": true
  7538. },
  7539. "Uncompressed IPv6 addresses with 0",
  7540. {
  7541. "input": "http://[0:1:0:1:0:1:0:1]",
  7542. "base": "about:blank",
  7543. "href": "http://[0:1:0:1:0:1:0:1]/",
  7544. "protocol": "http:",
  7545. "username": "",
  7546. "password": "",
  7547. "host": "[0:1:0:1:0:1:0:1]",
  7548. "hostname": "[0:1:0:1:0:1:0:1]",
  7549. "port": "",
  7550. "pathname": "/",
  7551. "search": "",
  7552. "hash": ""
  7553. },
  7554. {
  7555. "input": "http://[1:0:1:0:1:0:1:0]",
  7556. "base": "about:blank",
  7557. "href": "http://[1:0:1:0:1:0:1:0]/",
  7558. "protocol": "http:",
  7559. "username": "",
  7560. "password": "",
  7561. "host": "[1:0:1:0:1:0:1:0]",
  7562. "hostname": "[1:0:1:0:1:0:1:0]",
  7563. "port": "",
  7564. "pathname": "/",
  7565. "search": "",
  7566. "hash": ""
  7567. },
  7568. "Percent-encoded query and fragment",
  7569. {
  7570. "input": "http://example.org/test?\u0022",
  7571. "base": "about:blank",
  7572. "href": "http://example.org/test?%22",
  7573. "protocol": "http:",
  7574. "username": "",
  7575. "password": "",
  7576. "host": "example.org",
  7577. "hostname": "example.org",
  7578. "port": "",
  7579. "pathname": "/test",
  7580. "search": "?%22",
  7581. "hash": ""
  7582. },
  7583. {
  7584. "input": "http://example.org/test?\u0023",
  7585. "base": "about:blank",
  7586. "href": "http://example.org/test?#",
  7587. "protocol": "http:",
  7588. "username": "",
  7589. "password": "",
  7590. "host": "example.org",
  7591. "hostname": "example.org",
  7592. "port": "",
  7593. "pathname": "/test",
  7594. "search": "",
  7595. "hash": ""
  7596. },
  7597. {
  7598. "input": "http://example.org/test?\u003C",
  7599. "base": "about:blank",
  7600. "href": "http://example.org/test?%3C",
  7601. "protocol": "http:",
  7602. "username": "",
  7603. "password": "",
  7604. "host": "example.org",
  7605. "hostname": "example.org",
  7606. "port": "",
  7607. "pathname": "/test",
  7608. "search": "?%3C",
  7609. "hash": ""
  7610. },
  7611. {
  7612. "input": "http://example.org/test?\u003E",
  7613. "base": "about:blank",
  7614. "href": "http://example.org/test?%3E",
  7615. "protocol": "http:",
  7616. "username": "",
  7617. "password": "",
  7618. "host": "example.org",
  7619. "hostname": "example.org",
  7620. "port": "",
  7621. "pathname": "/test",
  7622. "search": "?%3E",
  7623. "hash": ""
  7624. },
  7625. {
  7626. "input": "http://example.org/test?\u2323",
  7627. "base": "about:blank",
  7628. "href": "http://example.org/test?%E2%8C%A3",
  7629. "protocol": "http:",
  7630. "username": "",
  7631. "password": "",
  7632. "host": "example.org",
  7633. "hostname": "example.org",
  7634. "port": "",
  7635. "pathname": "/test",
  7636. "search": "?%E2%8C%A3",
  7637. "hash": ""
  7638. },
  7639. {
  7640. "input": "http://example.org/test?%23%23",
  7641. "base": "about:blank",
  7642. "href": "http://example.org/test?%23%23",
  7643. "protocol": "http:",
  7644. "username": "",
  7645. "password": "",
  7646. "host": "example.org",
  7647. "hostname": "example.org",
  7648. "port": "",
  7649. "pathname": "/test",
  7650. "search": "?%23%23",
  7651. "hash": ""
  7652. },
  7653. {
  7654. "input": "http://example.org/test?%GH",
  7655. "base": "about:blank",
  7656. "href": "http://example.org/test?%GH",
  7657. "protocol": "http:",
  7658. "username": "",
  7659. "password": "",
  7660. "host": "example.org",
  7661. "hostname": "example.org",
  7662. "port": "",
  7663. "pathname": "/test",
  7664. "search": "?%GH",
  7665. "hash": ""
  7666. },
  7667. {
  7668. "input": "http://example.org/test?a#%EF",
  7669. "base": "about:blank",
  7670. "href": "http://example.org/test?a#%EF",
  7671. "protocol": "http:",
  7672. "username": "",
  7673. "password": "",
  7674. "host": "example.org",
  7675. "hostname": "example.org",
  7676. "port": "",
  7677. "pathname": "/test",
  7678. "search": "?a",
  7679. "hash": "#%EF"
  7680. },
  7681. {
  7682. "input": "http://example.org/test?a#%GH",
  7683. "base": "about:blank",
  7684. "href": "http://example.org/test?a#%GH",
  7685. "protocol": "http:",
  7686. "username": "",
  7687. "password": "",
  7688. "host": "example.org",
  7689. "hostname": "example.org",
  7690. "port": "",
  7691. "pathname": "/test",
  7692. "search": "?a",
  7693. "hash": "#%GH"
  7694. },
  7695. "URLs that require a non-about:blank base. (Also serve as invalid base tests.)",
  7696. {
  7697. "input": "a",
  7698. "base": "about:blank",
  7699. "failure": true,
  7700. "inputCanBeRelative": true
  7701. },
  7702. {
  7703. "input": "a/",
  7704. "base": "about:blank",
  7705. "failure": true,
  7706. "inputCanBeRelative": true
  7707. },
  7708. {
  7709. "input": "a//",
  7710. "base": "about:blank",
  7711. "failure": true,
  7712. "inputCanBeRelative": true
  7713. },
  7714. "Bases that don't fail to parse but fail to be bases",
  7715. {
  7716. "input": "test-a-colon.html",
  7717. "base": "a:",
  7718. "failure": true
  7719. },
  7720. {
  7721. "input": "test-a-colon-b.html",
  7722. "base": "a:b",
  7723. "failure": true
  7724. },
  7725. "Other base URL tests, that must succeed",
  7726. {
  7727. "input": "test-a-colon-slash.html",
  7728. "base": "a:/",
  7729. "href": "a:/test-a-colon-slash.html",
  7730. "protocol": "a:",
  7731. "username": "",
  7732. "password": "",
  7733. "host": "",
  7734. "hostname": "",
  7735. "port": "",
  7736. "pathname": "/test-a-colon-slash.html",
  7737. "search": "",
  7738. "hash": ""
  7739. },
  7740. {
  7741. "input": "test-a-colon-slash-slash.html",
  7742. "base": "a://",
  7743. "href": "a:///test-a-colon-slash-slash.html",
  7744. "protocol": "a:",
  7745. "username": "",
  7746. "password": "",
  7747. "host": "",
  7748. "hostname": "",
  7749. "port": "",
  7750. "pathname": "/test-a-colon-slash-slash.html",
  7751. "search": "",
  7752. "hash": ""
  7753. },
  7754. {
  7755. "input": "test-a-colon-slash-b.html",
  7756. "base": "a:/b",
  7757. "href": "a:/test-a-colon-slash-b.html",
  7758. "protocol": "a:",
  7759. "username": "",
  7760. "password": "",
  7761. "host": "",
  7762. "hostname": "",
  7763. "port": "",
  7764. "pathname": "/test-a-colon-slash-b.html",
  7765. "search": "",
  7766. "hash": ""
  7767. },
  7768. {
  7769. "input": "test-a-colon-slash-slash-b.html",
  7770. "base": "a://b",
  7771. "href": "a://b/test-a-colon-slash-slash-b.html",
  7772. "protocol": "a:",
  7773. "username": "",
  7774. "password": "",
  7775. "host": "b",
  7776. "hostname": "b",
  7777. "port": "",
  7778. "pathname": "/test-a-colon-slash-slash-b.html",
  7779. "search": "",
  7780. "hash": ""
  7781. },
  7782. "Null code point in fragment",
  7783. {
  7784. "input": "http://example.org/test?a#b\u0000c",
  7785. "base": "about:blank",
  7786. "href": "http://example.org/test?a#b%00c",
  7787. "protocol": "http:",
  7788. "username": "",
  7789. "password": "",
  7790. "host": "example.org",
  7791. "hostname": "example.org",
  7792. "port": "",
  7793. "pathname": "/test",
  7794. "search": "?a",
  7795. "hash": "#b%00c"
  7796. },
  7797. {
  7798. "input": "non-spec://example.org/test?a#b\u0000c",
  7799. "base": "about:blank",
  7800. "href": "non-spec://example.org/test?a#b%00c",
  7801. "protocol": "non-spec:",
  7802. "username": "",
  7803. "password": "",
  7804. "host": "example.org",
  7805. "hostname": "example.org",
  7806. "port": "",
  7807. "pathname": "/test",
  7808. "search": "?a",
  7809. "hash": "#b%00c"
  7810. },
  7811. {
  7812. "input": "non-spec:/test?a#b\u0000c",
  7813. "base": "about:blank",
  7814. "href": "non-spec:/test?a#b%00c",
  7815. "protocol": "non-spec:",
  7816. "username": "",
  7817. "password": "",
  7818. "host": "",
  7819. "hostname": "",
  7820. "port": "",
  7821. "pathname": "/test",
  7822. "search": "?a",
  7823. "hash": "#b%00c"
  7824. },
  7825. "First scheme char - not allowed: https://github.com/whatwg/url/issues/464",
  7826. {
  7827. "input": "10.0.0.7:8080/foo.html",
  7828. "base": "file:///some/dir/bar.html",
  7829. "href": "file:///some/dir/10.0.0.7:8080/foo.html",
  7830. "protocol": "file:",
  7831. "username": "",
  7832. "password": "",
  7833. "host": "",
  7834. "hostname": "",
  7835. "port": "",
  7836. "pathname": "/some/dir/10.0.0.7:8080/foo.html",
  7837. "search": "",
  7838. "hash": ""
  7839. },
  7840. "Subsequent scheme chars - not allowed",
  7841. {
  7842. "input": "a!@$*=/foo.html",
  7843. "base": "file:///some/dir/bar.html",
  7844. "href": "file:///some/dir/a!@$*=/foo.html",
  7845. "protocol": "file:",
  7846. "username": "",
  7847. "password": "",
  7848. "host": "",
  7849. "hostname": "",
  7850. "port": "",
  7851. "pathname": "/some/dir/a!@$*=/foo.html",
  7852. "search": "",
  7853. "hash": ""
  7854. },
  7855. "First and subsequent scheme chars - allowed",
  7856. {
  7857. "input": "a1234567890-+.:foo/bar",
  7858. "base": "http://example.com/dir/file",
  7859. "href": "a1234567890-+.:foo/bar",
  7860. "protocol": "a1234567890-+.:",
  7861. "username": "",
  7862. "password": "",
  7863. "host": "",
  7864. "hostname": "",
  7865. "port": "",
  7866. "pathname": "foo/bar",
  7867. "search": "",
  7868. "hash": ""
  7869. },
  7870. "IDNA ignored code points in file URLs hosts",
  7871. {
  7872. "input": "file://a\u00ADb/p",
  7873. "base": "about:blank",
  7874. "href": "file://ab/p",
  7875. "protocol": "file:",
  7876. "username": "",
  7877. "password": "",
  7878. "host": "ab",
  7879. "hostname": "ab",
  7880. "port": "",
  7881. "pathname": "/p",
  7882. "search": "",
  7883. "hash": ""
  7884. },
  7885. {
  7886. "input": "file://a%C2%ADb/p",
  7887. "base": "about:blank",
  7888. "href": "file://ab/p",
  7889. "protocol": "file:",
  7890. "username": "",
  7891. "password": "",
  7892. "host": "ab",
  7893. "hostname": "ab",
  7894. "port": "",
  7895. "pathname": "/p",
  7896. "search": "",
  7897. "hash": ""
  7898. },
  7899. "Empty host after the domain to ASCII",
  7900. {
  7901. "input": "file://\u00ad/p",
  7902. "base": "about:blank",
  7903. "failure": true
  7904. },
  7905. {
  7906. "input": "file://%C2%AD/p",
  7907. "base": "about:blank",
  7908. "failure": true
  7909. },
  7910. {
  7911. "input": "file://xn--/p",
  7912. "base": "about:blank",
  7913. "failure": true
  7914. },
  7915. "https://bugzilla.mozilla.org/show_bug.cgi?id=1647058",
  7916. {
  7917. "input": "#link",
  7918. "base": "https://example.org/##link",
  7919. "href": "https://example.org/#link",
  7920. "protocol": "https:",
  7921. "username": "",
  7922. "password": "",
  7923. "host": "example.org",
  7924. "hostname": "example.org",
  7925. "port": "",
  7926. "pathname": "/",
  7927. "search": "",
  7928. "hash": "#link"
  7929. },
  7930. "UTF-8 percent-encode of C0 control percent-encode set and supersets",
  7931. {
  7932. "input": "non-special:cannot-be-a-base-url-\u0000\u0001\u001F\u001E\u007E\u007F\u0080",
  7933. "base": "about:blank",
  7934. "hash": "",
  7935. "host": "",
  7936. "hostname": "",
  7937. "href": "non-special:cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80",
  7938. "origin": "null",
  7939. "password": "",
  7940. "pathname": "cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80",
  7941. "port": "",
  7942. "protocol": "non-special:",
  7943. "search": "",
  7944. "username": ""
  7945. },
  7946. {
  7947. "input": "https://www.example.com/path{\u007Fpath.html?query'\u007F=query#fragment<\u007Ffragment",
  7948. "base": "about:blank",
  7949. "hash": "#fragment%3C%7Ffragment",
  7950. "host": "www.example.com",
  7951. "hostname": "www.example.com",
  7952. "href": "https://www.example.com/path%7B%7Fpath.html?query%27%7F=query#fragment%3C%7Ffragment",
  7953. "origin": "https://www.example.com",
  7954. "password": "",
  7955. "pathname": "/path%7B%7Fpath.html",
  7956. "port": "",
  7957. "protocol": "https:",
  7958. "search": "?query%27%7F=query",
  7959. "username": ""
  7960. },
  7961. {
  7962. "input": "https://user:pass[\u007F@foo/bar",
  7963. "base": "http://example.org",
  7964. "hash": "",
  7965. "host": "foo",
  7966. "hostname": "foo",
  7967. "href": "https://user:pass%5B%7F@foo/bar",
  7968. "origin": "https://foo",
  7969. "password": "pass%5B%7F",
  7970. "pathname": "/bar",
  7971. "port": "",
  7972. "protocol": "https:",
  7973. "search": "",
  7974. "username": "user"
  7975. },
  7976. "Tests for the distinct percent-encode sets",
  7977. {
  7978. "input": "foo:// !\"$%&'()*+,-.;<=>@[\\]^_`{|}~@host/",
  7979. "base": "about:blank",
  7980. "hash": "",
  7981. "host": "host",
  7982. "hostname": "host",
  7983. "href": "foo://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/",
  7984. "origin": "null",
  7985. "password": "",
  7986. "pathname": "/",
  7987. "port":"",
  7988. "protocol": "foo:",
  7989. "search": "",
  7990. "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~"
  7991. },
  7992. {
  7993. "input": "wss:// !\"$%&'()*+,-.;<=>@[]^_`{|}~@host/",
  7994. "base": "about:blank",
  7995. "hash": "",
  7996. "host": "host",
  7997. "hostname": "host",
  7998. "href": "wss://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",
  7999. "origin": "wss://host",
  8000. "password": "",
  8001. "pathname": "/",
  8002. "port":"",
  8003. "protocol": "wss:",
  8004. "search": "",
  8005. "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~"
  8006. },
  8007. {
  8008. "input": "foo://joe: !\"$%&'()*+,-.:;<=>@[\\]^_`{|}~@host/",
  8009. "base": "about:blank",
  8010. "hash": "",
  8011. "host": "host",
  8012. "hostname": "host",
  8013. "href": "foo://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/",
  8014. "origin": "null",
  8015. "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~",
  8016. "pathname": "/",
  8017. "port":"",
  8018. "protocol": "foo:",
  8019. "search": "",
  8020. "username": "joe"
  8021. },
  8022. {
  8023. "input": "wss://joe: !\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/",
  8024. "base": "about:blank",
  8025. "hash": "",
  8026. "host": "host",
  8027. "hostname": "host",
  8028. "href": "wss://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",
  8029. "origin": "wss://host",
  8030. "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~",
  8031. "pathname": "/",
  8032. "port":"",
  8033. "protocol": "wss:",
  8034. "search": "",
  8035. "username": "joe"
  8036. },
  8037. {
  8038. "input": "foo://!\"$%&'()*+,-.;=_`{}~/",
  8039. "base": "about:blank",
  8040. "hash": "",
  8041. "host": "!\"$%&'()*+,-.;=_`{}~",
  8042. "hostname": "!\"$%&'()*+,-.;=_`{}~",
  8043. "href":"foo://!\"$%&'()*+,-.;=_`{}~/",
  8044. "origin": "null",
  8045. "password": "",
  8046. "pathname": "/",
  8047. "port":"",
  8048. "protocol": "foo:",
  8049. "search": "",
  8050. "username": ""
  8051. },
  8052. {
  8053. "input": "wss://!\"$&'()*+,-.;=_`{}~/",
  8054. "base": "about:blank",
  8055. "hash": "",
  8056. "host": "!\"$&'()*+,-.;=_`{}~",
  8057. "hostname": "!\"$&'()*+,-.;=_`{}~",
  8058. "href":"wss://!\"$&'()*+,-.;=_`{}~/",
  8059. "origin": "wss://!\"$&'()*+,-.;=_`{}~",
  8060. "password": "",
  8061. "pathname": "/",
  8062. "port":"",
  8063. "protocol": "wss:",
  8064. "search": "",
  8065. "username": ""
  8066. },
  8067. {
  8068. "input": "foo://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~",
  8069. "base": "about:blank",
  8070. "hash": "",
  8071. "host": "host",
  8072. "hostname": "host",
  8073. "href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
  8074. "origin": "null",
  8075. "password": "",
  8076. "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
  8077. "port":"",
  8078. "protocol": "foo:",
  8079. "search": "",
  8080. "username": ""
  8081. },
  8082. {
  8083. "input": "wss://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~",
  8084. "base": "about:blank",
  8085. "hash": "",
  8086. "host": "host",
  8087. "hostname": "host",
  8088. "href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
  8089. "origin": "wss://host",
  8090. "password": "",
  8091. "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
  8092. "port":"",
  8093. "protocol": "wss:",
  8094. "search": "",
  8095. "username": ""
  8096. },
  8097. {
  8098. "input": "foo://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
  8099. "base": "about:blank",
  8100. "hash": "",
  8101. "host": "host",
  8102. "hostname": "host",
  8103. "href": "foo://host/dir/?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
  8104. "origin": "null",
  8105. "password": "",
  8106. "pathname": "/dir/",
  8107. "port":"",
  8108. "protocol": "foo:",
  8109. "search": "?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
  8110. "username": ""
  8111. },
  8112. {
  8113. "input": "wss://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
  8114. "base": "about:blank",
  8115. "hash": "",
  8116. "host": "host",
  8117. "hostname": "host",
  8118. "href": "wss://host/dir/?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
  8119. "origin": "wss://host",
  8120. "password": "",
  8121. "pathname": "/dir/",
  8122. "port":"",
  8123. "protocol": "wss:",
  8124. "search": "?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
  8125. "username": ""
  8126. },
  8127. {
  8128. "input": "foo://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
  8129. "base": "about:blank",
  8130. "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
  8131. "host": "host",
  8132. "hostname": "host",
  8133. "href": "foo://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
  8134. "origin": "null",
  8135. "password": "",
  8136. "pathname": "/dir/",
  8137. "port":"",
  8138. "protocol": "foo:",
  8139. "search": "",
  8140. "username": ""
  8141. },
  8142. {
  8143. "input": "wss://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
  8144. "base": "about:blank",
  8145. "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
  8146. "host": "host",
  8147. "hostname": "host",
  8148. "href": "wss://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
  8149. "origin": "wss://host",
  8150. "password": "",
  8151. "pathname": "/dir/",
  8152. "port":"",
  8153. "protocol": "wss:",
  8154. "search": "",
  8155. "username": ""
  8156. },
  8157. "Ensure that input schemes are not ignored when resolving non-special URLs",
  8158. {
  8159. "input": "abc:rootless",
  8160. "base": "abc://host/path",
  8161. "hash": "",
  8162. "host": "",
  8163. "hostname": "",
  8164. "href":"abc:rootless",
  8165. "password": "",
  8166. "pathname": "rootless",
  8167. "port":"",
  8168. "protocol": "abc:",
  8169. "search": "",
  8170. "username": ""
  8171. },
  8172. {
  8173. "input": "abc:rootless",
  8174. "base": "abc:/path",
  8175. "hash": "",
  8176. "host": "",
  8177. "hostname": "",
  8178. "href":"abc:rootless",
  8179. "password": "",
  8180. "pathname": "rootless",
  8181. "port":"",
  8182. "protocol": "abc:",
  8183. "search": "",
  8184. "username": ""
  8185. },
  8186. {
  8187. "input": "abc:rootless",
  8188. "base": "abc:path",
  8189. "hash": "",
  8190. "host": "",
  8191. "hostname": "",
  8192. "href":"abc:rootless",
  8193. "password": "",
  8194. "pathname": "rootless",
  8195. "port":"",
  8196. "protocol": "abc:",
  8197. "search": "",
  8198. "username": ""
  8199. },
  8200. {
  8201. "input": "abc:/rooted",
  8202. "base": "abc://host/path",
  8203. "hash": "",
  8204. "host": "",
  8205. "hostname": "",
  8206. "href":"abc:/rooted",
  8207. "password": "",
  8208. "pathname": "/rooted",
  8209. "port":"",
  8210. "protocol": "abc:",
  8211. "search": "",
  8212. "username": ""
  8213. }
  8214. ]