Update contrib.
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __CURIUTILSTEST_H__
17 #define __CURIUTILSTEST_H__
25 #include "IpuTestUtils.h"
26 #include "ctestbase.h"
28 class CUriUtilsTest : public CTestBase
32 // Static factory c'tor.
34 // Rtn: pointer to newly created object - ownership transfered to caller.
36 static CUriUtilsTest* NewLC(CIpuTestHarness* aTestHarness);
38 // Static factory c'tor.
40 // Rtn: pointer to newly created object - ownership transfered to caller.
42 static CUriUtilsTest* NewL(CIpuTestHarness* aTestHarness);
56 CUriUtilsTest(CIpuTestHarness* aTestHarness);
58 // 2nd phase construction
62 // Tests ConvertToInternetForm
65 // aData - the display uri
66 // aExpected - the internet form
68 void TestUriUtilsConvertToInternetFormL(const TDesC& aData, const TDesC& aExpected);
69 void TestUriUtilsConvertToInternetFormDeprecatedL(const TDesC& aData, const TDesC& aExpected);
71 // Tests ConvertToDisplayForm
74 // aData - the internet uri
75 // aExpected - the display form
77 void TestUriUtilsConvertToDisplayFormL(const TDesC& aData, const TDesC& aExpected);
78 void TestUriUtilsConvertToDisplayFormDeprecatedL(const TDesC& aData, const TDesC& aExpected);
79 // Tests HasInvalidChars (16-Bit)
83 // aHadInvalidChars - expected result
85 void TestUriUtilsHasInvalidCharsL(const TDesC16& aData, TBool aHasInvalidChars);
87 // Tests HasInvalidChars (8-Bit)
91 // aHadInvalidChars - expected result
93 void TestUriUtilsHasInvalidCharsL(const TDesC8& aData, TBool aHasInvalidChars);
95 // Tests HostType (16-bit)
99 // aHostType - expected host type
100 void TestUriUtilsHostTypeL(const TDesC16& aData, UriUtils::TUriHostType aHostType);
102 // Tests HostType (8-bit)
106 // aHostType - expected host type
107 void TestUriUtilsHostTypeL(const TDesC8& aData, UriUtils::TUriHostType aHostType);
109 private: // Attributes
113 CIpuTestHarness* iTestHarness;
117 #endif // __CURIUTILSTEST_H__