|
1 // Copyright (c) 2000-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // WAP Push - ConnectionManager Test Harness |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __T_FAILURE_H__ |
|
19 #define __T_FAILURE_H__ |
|
20 |
|
21 // |
|
22 // CFailureTester: INTERFACE // |
|
23 // |
|
24 |
|
25 class CPushMessageTester : public CBase |
|
26 { |
|
27 public: |
|
28 static CPushMessageTester* NewL(); |
|
29 ~CPushMessageTester(); |
|
30 |
|
31 void FailureTestL(); |
|
32 void PluginFailureTestL(); |
|
33 private: |
|
34 CPushMessageTester(); |
|
35 private: |
|
36 HBufC8* iBody; |
|
37 HBufC8* iHeader; |
|
38 CPushMessage* iMessage; |
|
39 }; |
|
40 |
|
41 class CFailureTester : public CBase |
|
42 { |
|
43 public: |
|
44 static CFailureTester* NewL(CWapPushLog& aWapLog); |
|
45 ~CFailureTester(); |
|
46 |
|
47 void HeapFailureTest(); |
|
48 void InitSchedulerL(); |
|
49 void PluginHeapFailureTest(); |
|
50 private: |
|
51 CFailureTester(CWapPushLog& aWapLog); |
|
52 CPushMessageTester* DoPushMessageTestL(); |
|
53 CPushMessage* DoPushMessageTest2L(); |
|
54 CPushMessageTester* CreatePushHandlerBaseL(); |
|
55 |
|
56 //Logging functions |
|
57 void LogStr(const TDesC& aDes); |
|
58 void LogFormatInt(const TDesC& aFormat, TInt aInt); |
|
59 void LogFormatInt(const TDesC& aFormat, TInt aInt1, TInt aInt2); |
|
60 void LogFormatStr(const TDesC& aFormat, const TDesC& aDes); |
|
61 |
|
62 private: |
|
63 CWapPushLog& iLog; //Don't own this |
|
64 TBuf<256> iFormatBuffer; |
|
65 CActiveScheduler *iScheduler; |
|
66 }; |
|
67 |
|
68 #endif |