sl@0: // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __URIANDAUTHORITYTESTS_H__ sl@0: #define __URIANDAUTHORITYTESTS_H__ sl@0: sl@0: #include sl@0: sl@0: #include "CUriAndAuthorityTest.h" sl@0: sl@0: // sl@0: // sl@0: // Uri Resolving test data sl@0: // sl@0: // sl@0: sl@0: _LIT(KBaseFile, "file://c|/data.wml"); sl@0: _LIT(KRelativeFile1, "#card2"); _LIT(KResolvedFile1, "file://c|/data.wml#card2"); sl@0: sl@0: _LIT(KBase, "http://a/b/c/d;p?q"); sl@0: _LIT(KRelative1, "g:h"); _LIT(KResolved1, "g:h"); sl@0: _LIT(KRelative2, "g"); _LIT(KResolved2, "http://a/b/c/g"); sl@0: _LIT(KRelative3, "./g"); _LIT(KResolved3, "http://a/b/c/g"); sl@0: _LIT(KRelative4, "g/"); _LIT(KResolved4, "http://a/b/c/g/"); sl@0: _LIT(KRelative5, "/g"); _LIT(KResolved5, "http://a/g"); sl@0: _LIT(KRelative6, "//g"); _LIT(KResolved6, "http://g"); sl@0: _LIT(KRelative7, "?y"); _LIT(KResolved7, "http://a/b/c/d;p?y"); sl@0: _LIT(KRelative8, "g?y"); _LIT(KResolved8, "http://a/b/c/g?y"); sl@0: _LIT(KRelative9, "#s"); _LIT(KResolved9, "http://a/b/c/d;p?q#s"); sl@0: _LIT(KRelative10, "g#s"); _LIT(KResolved10, "http://a/b/c/g#s"); sl@0: _LIT(KRelative11, "g?y#s"); _LIT(KResolved11, "http://a/b/c/g?y#s"); sl@0: _LIT(KRelative12, ";x"); _LIT(KResolved12, "http://a/b/c/;x"); sl@0: _LIT(KRelative13, "g;x"); _LIT(KResolved13, "http://a/b/c/g;x"); sl@0: _LIT(KRelative14, "g;x?y#s"); _LIT(KResolved14, "http://a/b/c/g;x?y#s"); sl@0: _LIT(KRelative15, "."); _LIT(KResolved15, "http://a/b/c/"); sl@0: _LIT(KRelative16, "./"); _LIT(KResolved16, "http://a/b/c/"); sl@0: _LIT(KRelative17, ".."); _LIT(KResolved17, "http://a/b/"); sl@0: _LIT(KRelative18, "../"); _LIT(KResolved18, "http://a/b/"); sl@0: _LIT(KRelative19, "../g"); _LIT(KResolved19, "http://a/b/g"); sl@0: _LIT(KRelative20, "../.."); _LIT(KResolved20, "http://a/"); sl@0: _LIT(KRelative21, "../../"); _LIT(KResolved21, "http://a/"); sl@0: _LIT(KRelative22, "../../g"); _LIT(KResolved22, "http://a/g"); sl@0: sl@0: // abnormal examples sl@0: sl@0: _LIT(KRelative23, "../../../g"); _LIT(KResolved23, "http://a/../g"); //The Resolved Uri as per RFC3986 is http://a/g sl@0: _LIT(KRelative24, "../../../../g"); _LIT(KResolved24, "http://a/../../g"); //The Resolved Uri as per RFC3986 is http://a/g sl@0: _LIT(KRelative25, "/./g"); _LIT(KResolved25, "http://a/./g"); //The Resolved Uri as per RFC3986 is http://a/g sl@0: _LIT(KRelative26, "/../g"); _LIT(KResolved26, "http://a/../g"); //The Resolved Uri as per RFC3986 is http://a/g sl@0: _LIT(KRelative27, "g."); _LIT(KResolved27, "http://a/b/c/g."); sl@0: _LIT(KRelative28, ".g"); _LIT(KResolved28, "http://a/b/c/.g"); sl@0: _LIT(KRelative29, "g.."); _LIT(KResolved29, "http://a/b/c/g.."); sl@0: _LIT(KRelative30, "..g"); _LIT(KResolved30, "http://a/b/c/..g"); sl@0: sl@0: // non sensical uses of '.' and '..' sl@0: _LIT(KRelative31, "./../g"); _LIT(KResolved31, "http://a/b/g"); sl@0: _LIT(KRelative32, "./g/."); _LIT(KResolved32, "http://a/b/c/g/"); sl@0: _LIT(KRelative33, "g/./h"); _LIT(KResolved33, "http://a/b/c/g/h"); sl@0: _LIT(KRelative34, "g/../h"); _LIT(KResolved34, "http://a/b/c/h"); sl@0: _LIT(KRelative35, "g;x=1/./y"); _LIT(KResolved35, "http://a/b/c/g;x=1/y"); sl@0: _LIT(KRelative36, "g;x=1/../y"); _LIT(KResolved36, "http://a/b/c/y"); sl@0: sl@0: // use of query and fragment sl@0: _LIT(KRelative37, "g?y/./x"); _LIT(KResolved37, "http://a/b/c/g?y/./x"); sl@0: _LIT(KRelative38, "g?y/../x"); _LIT(KResolved38, "http://a/b/c/g?y/../x"); sl@0: _LIT(KRelative39, "g#s/./x"); _LIT(KResolved39, "http://a/b/c/g#s/./x"); sl@0: _LIT(KRelative40, "g#s/../x"); _LIT(KResolved40, "http://a/b/c/g#s/../x"); sl@0: sl@0: // backwards compatiable , do relative parsing if schemes match sl@0: _LIT(KRelative41, "http:g"); _LIT(KResolved41, "http://a/b/c/g"); sl@0: sl@0: // possible bug if relative url is a network path with a path aswell! sl@0: _LIT(KRelative42, "//g/h/i"); _LIT(KResolved42, "http://g/h/i"); sl@0: sl@0: // ResolveL defect EDNPHAD-4J6EUY sl@0: _LIT(KBaseBug1, "http://wap.h2g2.com#welcome"); sl@0: _LIT(KRelativeBug1, "funcs.wml#setup(\")"); _LIT(KResolvedBug1, "http://wap.h2g2.com/funcs.wml#setup(\")"); sl@0: sl@0: _LIT(KBaseBug2, "http://wap.h2g2.com/welcome"); sl@0: _LIT(KRelativeBug2, "funcs.wml#setup(\")"); _LIT(KResolvedBug2, "http://wap.h2g2.com/funcs.wml#setup(\")"); sl@0: _LIT(KRelativeBug3, "home/funcs.wml#setup(\")"); _LIT(KResolvedBug3, "http://wap.h2g2.com/home/funcs.wml#setup(\")"); sl@0: sl@0: // ResolveL defect EDNFUDN-4JYFH7 sl@0: _LIT(KBaseBug3, "http://mobile.iii.co.uk"); sl@0: _LIT(KRelativeBug4, "i/iii_splash.wbm"); _LIT(KResolvedBug4, "http://mobile.iii.co.uk/i/iii_splash.wbm"); sl@0: sl@0: // Relative fragment defect EDNEHHO-4M5BU6 - wml/state/variables/substitution/4 -test doesn't work sl@0: _LIT(KFragmentBase, "http://trras02.it.cellulardata.com/vswap114/htroot/wap/wml/state/variables/substitution/4/?v=dozig&ts=0003&ti=3"); sl@0: _LIT(KFragmentRelative, "#card1"); sl@0: _LIT(KFragmentResolved, "http://trras02.it.cellulardata.com/vswap114/htroot/wap/wml/state/variables/substitution/4/?v=dozig&ts=0003&ti=3#card1"); sl@0: sl@0: // sl@0: // sl@0: // Uri and Authority component extraction test data sl@0: // sl@0: // sl@0: sl@0: _LIT(KComps0, "http://user:pass@location.com:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KScheme0, "http"); sl@0: _LIT(KAuthority0, "user:pass@location.com:1666"); sl@0: _LIT(KPath0, "/abcd/ada/resource.cgi;x=123;df223;2342;2323"); sl@0: _LIT(KQuery0, "asd=b"); sl@0: _LIT(KFragment0, "part"); sl@0: _LIT(KUser0, "user"); sl@0: _LIT(KPass0, "pass"); sl@0: _LIT(KHost0, "location.com"); sl@0: _LIT(KUserInfo0, "user:pass"); sl@0: _LIT(KPort0, "1666"); sl@0: sl@0: _LIT(KComps1, "http://user:pass@location.com:/abcd/ada/resource.cgi?asd=b"); sl@0: _LIT(KScheme1, "http"); sl@0: _LIT(KAuthority1, "user:pass@location.com:"); sl@0: _LIT(KPath1, "/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery1, "asd=b"); sl@0: _LIT(KFragment1, ""); sl@0: _LIT(KUser1, "user"); sl@0: _LIT(KPass1, "pass"); sl@0: _LIT(KHost1, "location.com"); sl@0: _LIT(KUserInfo1, "user:pass"); sl@0: _LIT(KPort1, ""); sl@0: sl@0: _LIT(KComps2, "http://user:pass@location.com:1666/abcd/ada/resource.cgi"); sl@0: _LIT(KScheme2, "http"); sl@0: _LIT(KAuthority2, "user:pass@location.com:1666"); sl@0: _LIT(KPath2, "/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery2, ""); sl@0: _LIT(KFragment2, ""); sl@0: _LIT(KUser2, "user"); sl@0: _LIT(KPass2, "pass"); sl@0: _LIT(KHost2, "location.com"); sl@0: _LIT(KUserInfo2, "user:pass"); sl@0: _LIT(KPort2, "1666"); sl@0: sl@0: _LIT(KComps3, "http://user:pass@location.com/abcd/ada/"); sl@0: _LIT(KScheme3, "http"); sl@0: _LIT(KAuthority3, "user:pass@location.com"); sl@0: _LIT(KPath3, "/abcd/ada/"); sl@0: _LIT(KQuery3, ""); sl@0: _LIT(KFragment3, ""); sl@0: _LIT(KUser3, "user"); sl@0: _LIT(KPass3, "pass"); sl@0: _LIT(KHost3, "location.com"); sl@0: _LIT(KUserInfo3, "user:pass"); sl@0: _LIT(KPort3, ""); sl@0: sl@0: _LIT(KComps4, "http://user:pass@location.com"); sl@0: _LIT(KScheme4, "http"); sl@0: _LIT(KAuthority4, "user:pass@location.com"); sl@0: _LIT(KPath4, ""); sl@0: _LIT(KQuery4, ""); sl@0: _LIT(KFragment4, ""); sl@0: _LIT(KUser4, "user"); sl@0: _LIT(KPass4, "pass"); sl@0: _LIT(KHost4, "location.com"); sl@0: _LIT(KUserInfo4, "user:pass"); sl@0: _LIT(KPort4, ""); sl@0: sl@0: _LIT(KComps5, "http://"); sl@0: _LIT(KScheme5, "http"); sl@0: _LIT(KAuthority5, ""); sl@0: _LIT(KPath5, ""); sl@0: _LIT(KQuery5, ""); sl@0: _LIT(KFragment5, ""); sl@0: _LIT(KUser5, ""); sl@0: _LIT(KPass5, ""); sl@0: _LIT(KHost5, ""); sl@0: _LIT(KUserInfo5, ""); sl@0: _LIT(KPort5, ""); sl@0: sl@0: _LIT(KComps6, ""); sl@0: _LIT(KScheme6, ""); sl@0: _LIT(KAuthority6, ""); sl@0: _LIT(KPath6, ""); sl@0: _LIT(KQuery6, ""); sl@0: _LIT(KFragment6, ""); sl@0: _LIT(KUser6, ""); sl@0: _LIT(KPass6, ""); sl@0: _LIT(KHost6, ""); sl@0: _LIT(KUserInfo6, ""); sl@0: _LIT(KPort6, ""); sl@0: sl@0: _LIT(KComps10, "http://user:pass@location.com/abcd/ada/resource.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme10, "http"); sl@0: _LIT(KAuthority10, "user:pass@location.com"); sl@0: _LIT(KPath10, "/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery10, "asd=b"); sl@0: _LIT(KFragment10, "pa://rt"); sl@0: _LIT(KUser10, "user"); sl@0: _LIT(KPass10, "pass"); sl@0: _LIT(KHost10, "location.com"); sl@0: _LIT(KUserInfo10, "user:pass"); sl@0: _LIT(KPort10, ""); sl@0: sl@0: _LIT(KComps11, "http://user:pass@location.com/abcd/ada/resource.cgi?as/d=b#pa://rt"); sl@0: _LIT(KScheme11, "http"); sl@0: _LIT(KAuthority11, "user:pass@location.com"); sl@0: _LIT(KPath11, "/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery11, "as/d=b"); sl@0: _LIT(KFragment11, "pa://rt"); sl@0: _LIT(KUser11, "user"); sl@0: _LIT(KPass11, "pass"); sl@0: _LIT(KHost11, "location.com"); sl@0: _LIT(KUserInfo11, "user:pass"); sl@0: _LIT(KPort11, ""); sl@0: sl@0: _LIT(KComps12, "http://user:pass@location.com/abcd/ada/reso://urce.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme12, "http"); sl@0: _LIT(KAuthority12, "user:pass@location.com"); sl@0: _LIT(KPath12, "/abcd/ada/reso://urce.cgi"); sl@0: _LIT(KQuery12, "asd=b"); sl@0: _LIT(KFragment12, "pa://rt"); sl@0: _LIT(KUser12, "user"); sl@0: _LIT(KPass12, "pass"); sl@0: _LIT(KHost12, "location.com"); sl@0: _LIT(KUserInfo12, "user:pass"); sl@0: _LIT(KPort12, ""); sl@0: sl@0: _LIT(KComps13, "http://user:pass@location.com/abc://d/ada/resource.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme13, "http"); sl@0: _LIT(KAuthority13, "user:pass@location.com"); sl@0: _LIT(KPath13, "/abc://d/ada/resource.cgi"); sl@0: _LIT(KQuery13, "asd=b"); sl@0: _LIT(KFragment13, "pa://rt"); sl@0: _LIT(KUser13, "user"); sl@0: _LIT(KPass13, "pass"); sl@0: _LIT(KHost13, "location.com"); sl@0: _LIT(KUserInfo13, "user:pass"); sl@0: _LIT(KPort13, ""); sl@0: sl@0: _LIT(KComps14, "http://user:pass@loc://ation.com/abcd/ada/resource.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme14, "http"); sl@0: _LIT(KAuthority14, "user:pass@loc:"); sl@0: _LIT(KPath14, "//ation.com/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery14, "asd=b"); sl@0: _LIT(KFragment14, "pa://rt"); sl@0: _LIT(KUser14, "user"); sl@0: _LIT(KPass14, "pass"); sl@0: _LIT(KHost14, "loc"); sl@0: _LIT(KUserInfo14, "user:pass"); sl@0: _LIT(KPort14, ""); sl@0: sl@0: _LIT(KComps15, "ht~tp://user:pass@location.com/abcd/ada/resource.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme15, "ht~tp"); sl@0: _LIT(KAuthority15, "user:pass@location.com"); sl@0: _LIT(KPath15, "/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery15, "asd=b"); sl@0: _LIT(KFragment15, "pa://rt"); sl@0: _LIT(KUser15, "user"); sl@0: _LIT(KPass15, "pass"); sl@0: _LIT(KHost15, "location.com"); sl@0: _LIT(KUserInfo15, "user:pass"); sl@0: _LIT(KPort15, ""); sl@0: sl@0: _LIT(KComps16, "user:pass@location.com/abcd/ada/resource.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme16, "user"); sl@0: _LIT(KAuthority16, ""); sl@0: _LIT(KPath16, "pass@location.com/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery16, "asd=b"); sl@0: _LIT(KFragment16, "pa://rt"); sl@0: _LIT(KUser16, ""); sl@0: _LIT(KPass16, ""); sl@0: _LIT(KHost16, ""); sl@0: _LIT(KUserInfo16, ""); sl@0: _LIT(KPort16, ""); sl@0: sl@0: _LIT(KComps17, "/abcd/ada/resource.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme17, ""); sl@0: _LIT(KAuthority17, ""); sl@0: _LIT(KPath17, "/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery17, "asd=b"); sl@0: _LIT(KFragment17, "pa://rt"); sl@0: _LIT(KUser17, ""); sl@0: _LIT(KPass17, ""); sl@0: _LIT(KHost17, ""); sl@0: _LIT(KUserInfo17, ""); sl@0: _LIT(KPort17, ""); sl@0: sl@0: _LIT(KComps18, "resource.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme18, ""); sl@0: _LIT(KAuthority18, ""); sl@0: _LIT(KPath18, "resource.cgi"); sl@0: _LIT(KQuery18, "asd=b"); sl@0: _LIT(KFragment18, "pa://rt"); sl@0: _LIT(KUser18, ""); sl@0: _LIT(KPass18, ""); sl@0: _LIT(KHost18, ""); sl@0: _LIT(KUserInfo18, ""); sl@0: _LIT(KPort18, ""); sl@0: sl@0: _LIT(KComps19, "?asd=b#pa://rt"); sl@0: _LIT(KScheme19, ""); sl@0: _LIT(KAuthority19, ""); sl@0: _LIT(KPath19, ""); sl@0: _LIT(KQuery19, "asd=b"); sl@0: _LIT(KFragment19, "pa://rt"); sl@0: _LIT(KUser19, ""); sl@0: _LIT(KPass19, ""); sl@0: _LIT(KHost19, ""); sl@0: _LIT(KUserInfo19, ""); sl@0: _LIT(KPort19, ""); sl@0: sl@0: _LIT(KComps20, "#pa://rt"); sl@0: _LIT(KScheme20, ""); sl@0: _LIT(KAuthority20, ""); sl@0: _LIT(KPath20, ""); sl@0: _LIT(KQuery20, ""); sl@0: _LIT(KFragment20, "pa://rt"); sl@0: _LIT(KUser20, ""); sl@0: _LIT(KPass20, ""); sl@0: _LIT(KHost20, ""); sl@0: _LIT(KUserInfo20, ""); sl@0: _LIT(KPort20, ""); sl@0: sl@0: _LIT(KComps21, "resource.cgi"); sl@0: _LIT(KScheme21, ""); sl@0: _LIT(KAuthority21, ""); sl@0: _LIT(KPath21, "resource.cgi"); sl@0: _LIT(KQuery21, ""); sl@0: _LIT(KFragment21, ""); sl@0: _LIT(KUser21, ""); sl@0: _LIT(KPass21, ""); sl@0: _LIT(KHost21, ""); sl@0: _LIT(KUserInfo21, ""); sl@0: _LIT(KPort21, ""); sl@0: sl@0: _LIT(KComps22, "?q#f"); sl@0: _LIT(KScheme22, ""); sl@0: _LIT(KAuthority22, ""); sl@0: _LIT(KPath22, ""); sl@0: _LIT(KQuery22, "q"); sl@0: _LIT(KFragment22, "f"); sl@0: _LIT(KUser22, ""); sl@0: _LIT(KPass22, ""); sl@0: _LIT(KHost22, ""); sl@0: _LIT(KUserInfo22, ""); sl@0: _LIT(KPort22, ""); sl@0: sl@0: _LIT(KComps23, "?q"); sl@0: _LIT(KScheme23, ""); sl@0: _LIT(KAuthority23, ""); sl@0: _LIT(KPath23, ""); sl@0: _LIT(KQuery23, "q"); sl@0: _LIT(KFragment23, ""); sl@0: _LIT(KUser23, ""); sl@0: _LIT(KPass23, ""); sl@0: _LIT(KHost23, ""); sl@0: _LIT(KUserInfo23, ""); sl@0: _LIT(KPort23, ""); sl@0: sl@0: _LIT(KComps24, "#f"); sl@0: _LIT(KScheme24, ""); sl@0: _LIT(KAuthority24, ""); sl@0: _LIT(KPath24, ""); sl@0: _LIT(KQuery24, ""); sl@0: _LIT(KFragment24, "f"); sl@0: _LIT(KUser24, ""); sl@0: _LIT(KPass24, ""); sl@0: _LIT(KHost24, ""); sl@0: _LIT(KUserInfo24, ""); sl@0: _LIT(KPort24, ""); sl@0: sl@0: _LIT(KComps25, "http://location.com/abcd/ada/resource.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme25, "http"); sl@0: _LIT(KAuthority25, "location.com"); sl@0: _LIT(KPath25, "/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery25, "asd=b"); sl@0: _LIT(KFragment25, "pa://rt"); sl@0: _LIT(KUser25, ""); sl@0: _LIT(KPass25, ""); sl@0: _LIT(KHost25, "location.com"); sl@0: _LIT(KUserInfo25, ""); sl@0: _LIT(KPort25, ""); sl@0: sl@0: _LIT(KComps26, "http://user@location.com/abcd/ada/resource.cgi?asd=b#pa://rt"); sl@0: _LIT(KScheme26, "http"); sl@0: _LIT(KAuthority26, "user@location.com"); sl@0: _LIT(KPath26, "/abcd/ada/resource.cgi"); sl@0: _LIT(KQuery26, "asd=b"); sl@0: _LIT(KFragment26, "pa://rt"); sl@0: _LIT(KUser26, "user"); sl@0: _LIT(KPass26, ""); sl@0: _LIT(KHost26, "location.com"); sl@0: _LIT(KUserInfo26, "user"); sl@0: _LIT(KPort26, ""); sl@0: sl@0: _LIT(KComps27, "http://wap.opengroup.org/"); sl@0: _LIT(KScheme27, "http"); sl@0: _LIT(KAuthority27, "wap.opengroup.org"); sl@0: _LIT(KPath27, "/"); sl@0: _LIT(KQuery27, ""); sl@0: _LIT(KFragment27, ""); sl@0: _LIT(KUser27, ""); sl@0: _LIT(KPass27, ""); sl@0: _LIT(KHost27, "wap.opengroup.org"); sl@0: _LIT(KUserInfo27, ""); sl@0: _LIT(KPort27, ""); sl@0: sl@0: _LIT(KComps28, "http://wap.opengroup.org/#index.wml"); sl@0: _LIT(KScheme28, "http"); sl@0: _LIT(KAuthority28, "wap.opengroup.org"); sl@0: _LIT(KPath28, "/"); sl@0: _LIT(KQuery28, ""); sl@0: _LIT(KFragment28, "index.wml"); sl@0: _LIT(KUser28, ""); sl@0: _LIT(KPass28, ""); sl@0: _LIT(KHost28, "wap.opengroup.org"); sl@0: _LIT(KUserInfo28, ""); sl@0: _LIT(KPort28, ""); sl@0: sl@0: _LIT(KComps29, "http://wap.opengroup.org/?mystuff"); sl@0: _LIT(KScheme29, "http"); sl@0: _LIT(KAuthority29, "wap.opengroup.org"); sl@0: _LIT(KPath29, "/"); sl@0: _LIT(KQuery29, "mystuff"); sl@0: _LIT(KFragment29, ""); sl@0: _LIT(KUser29, ""); sl@0: _LIT(KPass29, ""); sl@0: _LIT(KHost29, "wap.opengroup.org"); sl@0: _LIT(KUserInfo29, ""); sl@0: _LIT(KPort29, ""); sl@0: sl@0: sl@0: // IPv6 test cases sl@0: sl@0: _LIT(KComps30, "http://user:pass@[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KScheme30, "http"); sl@0: _LIT(KAuthority30, "user:pass@[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:1666"); sl@0: _LIT(KPath30, "/abcd/ada/resource.cgi;x=123;df223;2342;2323"); sl@0: _LIT(KQuery30, "asd=b"); sl@0: _LIT(KFragment30, "part"); sl@0: _LIT(KUser30, "user"); sl@0: _LIT(KPass30, "pass"); sl@0: _LIT(KHost30, "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210"); sl@0: _LIT(KUserInfo30, "user:pass"); sl@0: _LIT(KPort30, "1666"); sl@0: sl@0: _LIT(KComps31, "http://user:pass@[1080:0:0:0:8:800:200C:417A]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KScheme31, "http"); sl@0: _LIT(KAuthority31, "user:pass@[1080:0:0:0:8:800:200C:417A]:1666"); sl@0: _LIT(KPath31, "/abcd/ada/resource.cgi;x=123;df223;2342;2323"); sl@0: _LIT(KQuery31, "asd=b"); sl@0: _LIT(KFragment31, "part"); sl@0: _LIT(KUser31, "user"); sl@0: _LIT(KPass31, "pass"); sl@0: _LIT(KHost31, "1080:0:0:0:8:800:200C:417A"); sl@0: _LIT(KUserInfo31, "user:pass"); sl@0: _LIT(KPort31, "1666"); sl@0: sl@0: _LIT(KComps32, "http://user:pass@[3ffe:2a00:100:7031::1]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KScheme32, "http"); sl@0: _LIT(KAuthority32, "user:pass@[3ffe:2a00:100:7031::1]:1666"); sl@0: _LIT(KPath32, "/abcd/ada/resource.cgi;x=123;df223;2342;2323"); sl@0: _LIT(KQuery32, "asd=b"); sl@0: _LIT(KFragment32, "part"); sl@0: _LIT(KUser32, "user"); sl@0: _LIT(KPass32, "pass"); sl@0: _LIT(KHost32, "3ffe:2a00:100:7031::1"); sl@0: _LIT(KUserInfo32, "user:pass"); sl@0: _LIT(KPort32, "1666"); sl@0: sl@0: _LIT(KComps33, "http://user:pass@[1080::8:800:200C:417A]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KScheme33, "http"); sl@0: _LIT(KAuthority33, "user:pass@[1080::8:800:200C:417A]:1666"); sl@0: _LIT(KPath33, "/abcd/ada/resource.cgi;x=123;df223;2342;2323"); sl@0: _LIT(KQuery33, "asd=b"); sl@0: _LIT(KFragment33, "part"); sl@0: _LIT(KUser33, "user"); sl@0: _LIT(KPass33, "pass"); sl@0: _LIT(KHost33, "1080::8:800:200C:417A"); sl@0: _LIT(KUserInfo33, "user:pass"); sl@0: _LIT(KPort33, "1666"); sl@0: sl@0: _LIT(KComps34, "http://user:pass@[::192.9.5.5]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KScheme34, "http"); sl@0: _LIT(KAuthority34, "user:pass@[::192.9.5.5]:1666"); sl@0: _LIT(KPath34, "/abcd/ada/resource.cgi;x=123;df223;2342;2323"); sl@0: _LIT(KQuery34, "asd=b"); sl@0: _LIT(KFragment34, "part"); sl@0: _LIT(KUser34, "user"); sl@0: _LIT(KPass34, "pass"); sl@0: _LIT(KHost34, "::192.9.5.5"); sl@0: _LIT(KUserInfo34, "user:pass"); sl@0: _LIT(KPort34, "1666"); sl@0: sl@0: _LIT(KComps35, "http://user:pass@[::FfFf:129.144.52.38]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KScheme35, "http"); sl@0: _LIT(KAuthority35, "user:pass@[::FfFf:129.144.52.38]:1666"); sl@0: _LIT(KPath35, "/abcd/ada/resource.cgi;x=123;df223;2342;2323"); sl@0: _LIT(KQuery35, "asd=b"); sl@0: _LIT(KFragment35, "part"); sl@0: _LIT(KUser35, "user"); sl@0: _LIT(KPass35, "pass"); sl@0: _LIT(KHost35, "::FfFf:129.144.52.38"); sl@0: _LIT(KUserInfo35, "user:pass"); sl@0: _LIT(KPort35, "1666"); sl@0: sl@0: _LIT(KComps36, "http://user:pass@[2010:836B:4179::836B:4179]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KScheme36, "http"); sl@0: _LIT(KAuthority36, "user:pass@[2010:836B:4179::836B:4179]:1666"); sl@0: _LIT(KPath36, "/abcd/ada/resource.cgi;x=123;df223;2342;2323"); sl@0: _LIT(KQuery36, "asd=b"); sl@0: _LIT(KFragment36, "part"); sl@0: _LIT(KUser36, "user"); sl@0: _LIT(KPass36, "pass"); sl@0: _LIT(KHost36, "2010:836B:4179::836B:4179"); sl@0: _LIT(KUserInfo36, "user:pass"); sl@0: _LIT(KPort36, "1666"); sl@0: sl@0: sl@0: _LIT(KFileName1, "http://www.symbian.com"); _LIT(KFileNameExpected1, ""); sl@0: _LIT(KFileName2, "http://www.symbian.com/"); _LIT(KFileNameExpected2, ""); sl@0: _LIT(KFileName3, "http://www.symbian.com/images/"); _LIT(KFileNameExpected3, ""); sl@0: _LIT(KFileName4, "http://www.symbian.com/images"); _LIT(KFileNameExpected4, "images"); sl@0: _LIT(KFileName5, "http://www.symbian.com/images/epoc/img1.jpg"); _LIT(KFileNameExpected5, "img1.jpg"); sl@0: _LIT(KFileName6, "http://www.symbian.com/file.txt"); _LIT(KFileNameExpected6, "file.txt"); sl@0: sl@0: // sl@0: // sl@0: // Misc test data sl@0: // sl@0: // sl@0: sl@0: // TestCompare input data sl@0: // sl@0: //_LIT(KUrl0,"http://user:pass@location.com/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); // SLPRQG sl@0: _LIT(KUrl0,"http://user:pass@location.com/abcd/ada/resource.cgi?asd=b#part"); // SLPRQG sl@0: _LIT(KUrl1,"http://user:pass@location.com/abcd/ada/resource.cgi?asd=b"); // SLPRQ sl@0: _LIT(KUrl2,"http://user:pass@location.com/abcd/ada/resource.cgi"); // SLPR sl@0: _LIT(KUrl3,"http://user:pass@location.com/abcd/ada/"); // SLP sl@0: _LIT(KUrl4,"http://user:pass@location.com"); // SL sl@0: _LIT(KUrl5,"http://"); // S sl@0: _LIT(KUrl6,""); // sl@0: sl@0: _LIT(KUrl10,"http://user:pass@location.com/abcd/ada/resource.cgi?asd=b#pa://rt"); // SLPRQg sl@0: _LIT(KUrl11,"http://user:pass@location.com/abcd/ada/resource.cgi?as/d=b#pa://rt"); // SLPRqG sl@0: _LIT(KUrl12,"http://user:pass@location.com/abcd/ada/reso://urce.cgi?asd=b#pa://rt"); // SLPrQG sl@0: _LIT(KUrl13,"http://user:pass@location.com/abc://d/ada/resource.cgi?asd=b#pa://rt"); // SLpRQG sl@0: _LIT(KUrl14,"http://user:pass@loc://ation.com/abcd/ada/resource.cgi?asd=b#pa://rt"); // SlPRQG sl@0: _LIT(KUrl15,"ht~tp://user:pass@location.com/abcd/ada/resource.cgi?asd=b#pa://rt"); // sLPRQG sl@0: sl@0: _LIT(KUrl16,"user:pass@location.com/abcd/ada/resource.cgi?asd=b#pa://rt"); // SLPRQg sl@0: _LIT(KUrl17,"/abcd/ada/resource.cgi?asd=b#pa://rt"); // SLPRQg sl@0: _LIT(KUrl18,"resource.cgi?asd=b#pa://rt"); // SLPRQg sl@0: _LIT(KUrl19,"?asd=b#pa://rt"); // SLPRQg sl@0: _LIT(KUrl20,"#pa://rt"); // SLPRQg sl@0: _LIT(KUrl21,"resource.cgi"); // SLPRQg sl@0: sl@0: // Construct with TParseBase test data sl@0: // sl@0: _LIT(KParse0, "c:\\system\\data.wml"); _LIT(KParseResult0, "file://c|/system/data.wml"); sl@0: _LIT(KParse1, "c:\\wap files\\test.wml"); _LIT(KParseResult1, "file://c|/wap%20files/test.wml"); // Defect EDNTDAS-4N4K72 sl@0: sl@0: // Unescape url creation test data sl@0: // sl@0: _LIT(KEscapedString0, "the%20%25%5E%20weather"); _LIT(KUnescapedString0, "the %^ weather"); sl@0: _LIT(KEscapedString1, "%7Bcheck%3C%3Ethis%5B%5Dout%7D"); _LIT(KUnescapedString1, "{check<>this[]out}"); sl@0: _LIT(KEscapedString2a, "Reserved;/?:@&=+$,"); _LIT(KUnescapedString2, "Reserved;/?:@&=+$,"); sl@0: _LIT(KEscapedString2b, "Reserved%3B%2F%3F%3A%40%26%3D%2B%24%2C"); sl@0: sl@0: sl@0: // Construction defect EDNFUDN-4K9MD8 sl@0: // sl@0: _LIT(KCtorUrl0, ":\\http://www.bbc.co.uk/mobile/mainmenu.wml"); sl@0: sl@0: _LIT(KRubbish, "rubbish"); sl@0: _LIT(KSlashRubbish, "/rubbish"); sl@0: sl@0: // Leading whitespace defect EDNEPTA-4PBHSE - WAP:Go-element causes breakpoint if href-attribute has space in its beginning sl@0: _LIT(KLeadWhitespace1, " http://wap.iobox.com"); _LIT(KLeadWhitespaceUrl, "http://wap.iobox.com"); sl@0: _LIT(KLeadWhitespace2, " http://wap.iobox.com"); sl@0: sl@0: // sl@0: // sl@0: // Uri test data sl@0: // sl@0: // sl@0: sl@0: _LIT(KUri_IPv6Fragment0,"http://userinfo@[::FfFf:129.144.52.38]:port/a/b/c?query#fragment"); // with fragment sl@0: _LIT(KUri_IPv6Query0, "http://userinfo@[::FfFf:129.144.52.38]:port/a/b/c?query"); // with query sl@0: _LIT(KUri_IPv6Path0, "http://userinfo@[::FfFf:129.144.52.38]:port/a/b/c"); // with path sl@0: _LIT(KUri_IPv6Port0, "http://userinfo@[::FfFf:129.144.52.38]:port"); // with port sl@0: _LIT(KUri_IPv6UserInfo0,"http://userinfo@[::FfFf:129.144.52.38]"); // with userinfo sl@0: _LIT(KUri_IPv6Host0, "http://[::FfFf:129.144.52.38]"); // with scheme sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: _LIT(KUri_IPv6HostComp0, "::FfFf:129.144.52.38"); sl@0: sl@0: _LIT(KUri_Fragment0, "http://userinfo@host:port/a/b/c?query#fragment"); // With fragment sl@0: _LIT(KUri_Query0, "http://userinfo@host:port/a/b/c?query"); // With query sl@0: _LIT(KUri_Path0, "http://userinfo@host:port/a/b/c"); // With path sl@0: _LIT(KUri_Port0, "http://userinfo@host:port"); // With port sl@0: _LIT(KUri_Userinfo0, "http://userinfo@host"); // With userinfo sl@0: _LIT(KUri_Host0, "http://host"); // With host sl@0: _LIT(KUri_Scheme0, "http:"); // With scheme sl@0: sl@0: _LIT(KUri_SchemeComp0, "http"); sl@0: _LIT(KUri_UserinfoComp0, "userinfo"); sl@0: _LIT(KUri_HostComp0, "host"); sl@0: _LIT(KUri_PortComp0, "port"); sl@0: _LIT(KUri_PathComp0, "/a/b/c"); sl@0: _LIT(KUri_QueryComp0, "query"); sl@0: _LIT(KUri_FragmentComp0, "fragment"); sl@0: sl@0: _LIT(KUri_Compare0_a, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave#card1"); sl@0: _LIT(KUri_Compare0_b, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave#card1"); sl@0: const TInt KUriMatchFlags0 = (ESchemeFlag | EUserinfoFlag | EHostFlag | EPortFlag | EPathFlag | EQueryFlag | EFragmentFlag); sl@0: sl@0: _LIT(KUri_Compare1_a, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave#card1"); sl@0: _LIT(KUri_Compare1_b, "HTTP://USER@Www.symbian.com:1666/wap/dev/different.wml?name=dave#card1"); sl@0: const TInt KUriMatchFlags1 = (ESchemeFlag | EHostFlag | EPortFlag | EQueryFlag | EFragmentFlag); sl@0: sl@0: _LIT(KUri_Compare2_a, "http://user:pass@[fEdC:Ba98:7654:3210:FeDC:BA98:7654:3210]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KUri_Compare2_b, "http://user:pass@[FEDC:BA98:7654:3210:fedc:BA98:7654:3210]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: const TInt KUriMatchFlags2 = (ESchemeFlag | EUserinfoFlag | EHostFlag | EPortFlag | EPathFlag | EQueryFlag | EFragmentFlag); sl@0: sl@0: _LIT(KUri_Compare3_a, "http://Auser:pass@[::FfFf:129.144.52.38]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: _LIT(KUri_Compare3_b, "http://Buser:pass@[::FfFf:129.144.52.38]:1666/abcd/ada/resource.cgi;x=123;df223;2342;2323?asd=b#part"); sl@0: const TInt KUriMatchFlags3 = (ESchemeFlag | EHostFlag | EPortFlag | EPathFlag | EQueryFlag | EFragmentFlag); sl@0: sl@0: sl@0: sl@0: _LIT(KUri_SchemeValidation0, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave#card1"); sl@0: TBool KUri_SchemeValidity0 = ETrue; sl@0: sl@0: _LIT(KUri_SchemeValidation1, "ht~tp://user@www.symbian.com:1666/wap/dev/my.wml?name=dave#card1"); sl@0: TBool KUri_SchemeValidity1 = EFalse; sl@0: sl@0: _LIT(KUri_WithoutFragment0, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave#card1"); sl@0: _LIT(KUri_WithoutFragment_Result0, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave"); sl@0: sl@0: _LIT(KUri_WithoutFragment1, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave"); sl@0: _LIT(KUri_WithoutFragment_Result1, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave"); sl@0: sl@0: _LIT(KUri_Whole0, "http://userinfo@host:port/a/b/c?query#fragment"); // Whole uri sl@0: _LIT(KUri_NoFragment0, "http://userinfo@host:port/a/b/c?query"); // Without fragment sl@0: _LIT(KUri_NoQuery0, "http://userinfo@host:port/a/b/c"); // Without query sl@0: _LIT(KUri_NoPath0, "http://userinfo@host:port"); // Without path sl@0: _LIT(KUri_NoPort0, "http://userinfo@host"); // Without port sl@0: _LIT(KUri_NoUserinfo0, "http://host"); // Without userinfo sl@0: _LIT(KUri_NoHost0, "http:"); // Without host sl@0: _LIT(KUri_NoScheme0, ""); // Without scheme sl@0: sl@0: _LIT(KUri_IPv6Whole0, "http://userinfo@[::FfFf:129.144.52.38]:port/a/b/c?query#fragment"); // Whole uri sl@0: _LIT(KUri_IPv6NoFragment0, "http://userinfo@[::FfFf:129.144.52.38]:port/a/b/c?query"); // Without fragment sl@0: _LIT(KUri_IPv6NoQuery0, "http://userinfo@[::FfFf:129.144.52.38]:port/a/b/c"); // Without query sl@0: _LIT(KUri_IPv6NoPath0, "http://userinfo@[::FfFf:129.144.52.38]:port"); // Without path sl@0: _LIT(KUri_IPv6NoPort0, "http://userinfo@[::FfFf:129.144.52.38]"); // Without port sl@0: _LIT(KUri_IPv6NoUserinfo0, "http://[::FfFf:129.144.52.38]"); // Without userinfo sl@0: _LIT(KUri_IPv6NoHost0, "http:"); // Without host sl@0: _LIT(KUri_IPv6NoScheme0, ""); sl@0: sl@0: _LIT(KUri_Presence0, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave#card1"); sl@0: const TInt KUriPresenceFlags0 = (ESchemeFlag | EUserinfoFlag | EHostFlag | EPortFlag | EPathFlag | EQueryFlag | EFragmentFlag); sl@0: sl@0: _LIT(KUri_Presence1, "http://www.symbian.com:1666?name=dave"); sl@0: const TInt KUriPresenceFlags1 = (ESchemeFlag | EHostFlag | EPortFlag | EPathFlag | EQueryFlag ); sl@0: sl@0: _LIT(KAuthority_Presence0, "user@www.symbian.com:1666"); sl@0: const TInt KAuthorityPresenceFlags0 = (EUserinfoFlag | EHostFlag | EPortFlag ); sl@0: sl@0: _LIT(KAuthority_Presence1, "www.symbian.com"); sl@0: const TInt KAuthorityPresenceFlags1 = (EHostFlag); sl@0: sl@0: _LIT(KUri_Des0, "http://user@www.symbian.com:1666/wap/dev/my.wml?name=dave#card1"); sl@0: sl@0: // sl@0: // sl@0: // Authority test data sl@0: // sl@0: // sl@0: sl@0: _LIT(KAuth_Compare0_a, "user@www.symbian.com:1666"); sl@0: _LIT(KAuth_Compare0_b, "user@www.symbian.com:1666"); sl@0: const TInt KAuthMatchFlags0 = (EUserinfoFlag | EHostFlag | EPortFlag); sl@0: sl@0: _LIT(KAuth_Compare1_a, "user@www.symbian.com:1666"); sl@0: _LIT(KAuth_Compare1_b, "USER@Www.symbian.com:1666"); sl@0: const TInt KAuthMatchFlags1 = (EHostFlag | EPortFlag); sl@0: sl@0: _LIT(KAuthority_Des0, "user@www.symbian.com:1666"); sl@0: sl@0: _LIT(KAuthority_Port0, "userinfo@host:port"); // With port sl@0: _LIT(KAuthority_Userinfo0, "userinfo@host"); // With userinfo sl@0: _LIT(KAuthority_Host0, "host"); // With host sl@0: sl@0: _LIT(KAuthority_UserinfoComp0, "userinfo"); sl@0: _LIT(KAuthority_HostComp0, "host"); sl@0: _LIT(KAuthority_PortComp0, "port"); sl@0: sl@0: _LIT(KAuthorityEscaped_Port0, "some%3Astuff@host%2Fname:port%3Fnum"); // With port sl@0: _LIT(KAuthorityEscaped_Userinfo0, "some%3Astuff@host%2Fname"); // With userinfo sl@0: _LIT(KAuthorityEscaped_Host0, "host%2Fname"); // With host sl@0: sl@0: _LIT(KAuthorityEscaped_UserinfoComp0, "some:stuff"); sl@0: _LIT(KAuthorityEscaped_HostComp0, "host/name"); sl@0: _LIT(KAuthorityEscaped_PortComp0, "port?num"); sl@0: sl@0: _LIT(KAuthority_Whole0, "userinfo@host:port"); // Whole authority sl@0: _LIT(KAuthority_NoPort0, "userinfo@host"); // Without port sl@0: _LIT(KAuthority_NoUserinfo0, "host"); // Without userinfo sl@0: _LIT(KAuthority_NoHost0, ""); // Without host sl@0: sl@0: _LIT(KAuthority_IPv6Whole0, "userinfo@[::FfFf:129.144.52.38]:port"); // Whole authority sl@0: _LIT(KAuthority_IPv6NoPort0, "userinfo@[::FfFf:129.144.52.38]"); // Without port sl@0: _LIT(KAuthority_IPv6NoUserinfo0, "[::FfFf:129.144.52.38]"); // Without userinfo sl@0: _LIT(KAuthority_IPv6NoHost0, ""); sl@0: sl@0: _LIT(KAuthority_IPv6Port0, "userinfo@[::FfFf:129.144.52.38]:port"); // With port sl@0: _LIT(KAuthority_IPv6Userinfo0, "userinfo@[::FfFf:129.144.52.38]"); // With userinfo sl@0: _LIT(KAuthority_IPv6Host0, "[::FfFf:129.144.52.38]"); // With host sl@0: sl@0: _LIT(KAuthority_IPv6UserinfoComp0, "userinfo"); sl@0: _LIT(KAuthority_IPv6HostComp0, "::FfFf:129.144.52.38"); sl@0: _LIT(KAuthority_IPv6PortComp0, "port"); sl@0: sl@0: #endif // __URIANDAUTHORITYTESTS_H__