1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericservices/httputils/Test/t_uriparser/UriUtilsTests.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,94 @@
1.4 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +
1.20 +
1.21 +#ifndef __URIUTILSTESTS_H__
1.22 +#define __URIUTILSTESTS_H__
1.23 +
1.24 +// System includes
1.25 +//
1.26 +#include <e32base.h>
1.27 +
1.28 +//
1.29 +//
1.30 +// UriUtils test data
1.31 +//
1.32 +//
1.33 +
1.34 +_LIT(KInternetForm0, "http://user@host:port/my%20dir/my%25file.wml?name=dave&surname=cunado#fragment");
1.35 +_LIT(KDisplayForm0, "http://user@host:port/my dir/my%file.wml?name=dave&surname=cunado#fragment");
1.36 +_LIT(KValidDisplayForm0, "http://user@host:port/my%20dir/my%25file.wml?name=dave&surname=cunado#fragment");
1.37 +
1.38 +_LIT(KInternetForm1, "http://user@host:port/my%20dir/my%25file.wml?name=dave&surname=cunado");
1.39 +_LIT(KDisplayForm1, "http://user@host:port/my dir/my%file.wml?name=dave&surname=cunado");
1.40 +_LIT(KValidDisplayForm1, "http://user@host:port/my%20dir/my%25file.wml?name=dave&surname=cunado");
1.41 +
1.42 +_LIT(KInvalidChars0, "this is bad");
1.43 +_LIT(KInvalidChars1, "#thisisbad");
1.44 +_LIT(KInvalidChars2, "{thisisbad");
1.45 +_LIT(KInvalidChars3, "}thisisbad");
1.46 +_LIT(KInvalidChars4, "|thisisbad");
1.47 +_LIT(KInvalidChars5, "\\thisisbad");
1.48 +_LIT(KInvalidChars6, "^thisisbad");
1.49 +_LIT(KInvalidChars7, "`thisisbad");
1.50 +_LIT(KInvalidChars8, "<thisisbad");
1.51 +_LIT(KInvalidChars9, ">thisisbad");
1.52 +_LIT(KInvalidChars10, "%thisisbad");
1.53 +_LIT(KInvalidChars11, "\"thisisbad");
1.54 +TBool KInvalid0 = ETrue;
1.55 +
1.56 +_LIT(KInvalidChars12, "this%20is%20not");
1.57 +_LIT(KInvalidChars13, "%23thisisNotbad");
1.58 +_LIT(KInvalidChars14, "%7BthisisNotbad");
1.59 +_LIT(KInvalidChars15, "%7DthisisNotbad");
1.60 +_LIT(KInvalidChars16, "%7CthisisNotbad");
1.61 +_LIT(KInvalidChars17, "%5CthisisNotbad");
1.62 +_LIT(KInvalidChars18, "%5EthisisNotbad");
1.63 +_LIT(KInvalidChars19, "%60thisisNotbad");
1.64 +_LIT(KInvalidChars20, "%3CthisisNotbad");
1.65 +_LIT(KInvalidChars21, "%3EthisisNotbad");
1.66 +_LIT(KInvalidChars22, "%25thisisNotbad");
1.67 +_LIT(KInvalidChars23, "%22thisisNotbad");
1.68 +_LIT(KInvalidChars24, "*thisisNotbad");
1.69 +_LIT(KInvalidChars25, "(thisisNotbad");
1.70 +_LIT(KInvalidChars26, ")thisisNotbad");
1.71 +_LIT(KInvalidChars27, "!thisisNotbad");
1.72 +_LIT(KInvalidChars28, "'thisisNotbad");
1.73 +TBool KInvalid1 = EFalse;
1.74 +
1.75 +// Some different forms of IPv6 addresses
1.76 +_LIT(KHostTypeIPv6Format1, "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210");
1.77 +_LIT(KHostTypeIPv6Format2, "1080:0:0:0:8:800:200C:4171");
1.78 +_LIT(KHostTypeIPv6Format3, "3ffe:2a00:100:7031::1");
1.79 +_LIT(KHostTypeIPv6Format4, "1080::8:800:200C:417A");
1.80 +_LIT(KHostTypeIPv6Format5, "::192.9.5.5");
1.81 +_LIT(KHostTypeIPv6Format6, "::FFFF:129.144.52.38");
1.82 +_LIT(KHostTypeIPv6Format7, "2010:836B:4179::836B:4179");
1.83 +
1.84 +// IPv4 format addresses
1.85 +_LIT(KHostTypeIPv4Format, "196.58.110.201");
1.86 +_LIT(KHostTypeIPv4InvalidFormat1, "196.58"); // this is considered a text address
1.87 +_LIT(KHostTypeIPv4InvalidFormat2, "196.58.110"); // this is considered a text address
1.88 +
1.89 +// Text format addresses
1.90 +_LIT(KHostTypeTextFormat1, "www.symbian.com");
1.91 +_LIT(KHostTypeTextFormat2, "www.any.number.of.dot.seperated.parts.com");
1.92 +
1.93 +
1.94 +// Text format addresses
1.95 +
1.96 +
1.97 +#endif // __URIUTILSTESTS_H__