|
1 // Copyright (c) 2003-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 // |
|
15 |
|
16 #ifndef __CTESTCASE7_H__ |
|
17 #define __CTESTCASE7_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <http.h> |
|
21 |
|
22 #include "CPipeliningTestCase.h" |
|
23 |
|
24 class CHTTPTestUtils; |
|
25 |
|
26 /* Pipelining 10 simple requests, once the client has started, the 5th transaction is cancelled. |
|
27 It is expected that the cancelled transaction will fail but the rest must complete successfully. |
|
28 We expect that all the data would have been sent so any responses that have not been received |
|
29 will have to be resent. |
|
30 */ |
|
31 class CTestCase7 : public CPipeliningTestCase |
|
32 { |
|
33 public: |
|
34 static CTestCase7* NewL(CHTTPTestUtils& aTestUtils); |
|
35 ~CTestCase7(); |
|
36 |
|
37 private: |
|
38 CTestCase7(CHTTPTestUtils& aTestUtils); |
|
39 void ConstructL(); |
|
40 |
|
41 // From MPipeliningTestCase |
|
42 const TDesC& TestCaseName() const; |
|
43 TInt TotalTransactionCount() const; |
|
44 RHTTPTransaction GetTransactionL(TInt aIndex, RHTTPSession aSession, MHTTPTransactionCallback& aClient); |
|
45 TInt ExpectedError(RHTTPTransaction aTrans); |
|
46 const TDesC8& GetRawRequest(TInt aConnectionIndex, TInt aTransIndex); |
|
47 const TDesC8& GetRawResponse(TInt aConnectionIndex, TInt aTransIndex); |
|
48 TInt RealExpectedConnectionCount() const; |
|
49 |
|
50 private: |
|
51 CHTTPTestUtils& iTestUtils; |
|
52 RHTTPTransaction iTransToCancel; |
|
53 TInt iTransCount; |
|
54 TBool iIsTransCancelled; |
|
55 }; |
|
56 |
|
57 #endif // __CTESTCASE7_H__ |