|
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 #include "CINC025140.h" |
|
17 #include "httptestutils.h" |
|
18 |
|
19 const TInt KTransactionCount = 1; |
|
20 const TInt KConnectionCount = 1; |
|
21 _LIT8(KTxtRawRequest, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n"); |
|
22 _LIT8(KTxtRawResponse, "HTTP/1.1 200 \r\nContent-Length: 6\r\n\r\nhello!"); |
|
23 |
|
24 CINC025140* CINC025140::NewL(CHTTPTestUtils& aTestUtils) |
|
25 { |
|
26 CINC025140* self = new (ELeave) CINC025140(aTestUtils); |
|
27 CleanupStack::PushL(self); |
|
28 self->ConstructL(); |
|
29 CleanupStack::Pop(self); |
|
30 return self; |
|
31 } |
|
32 |
|
33 CINC025140::CINC025140(CHTTPTestUtils& aTestUtils) |
|
34 : CPipeliningTestCase(), iTestUtils(aTestUtils) |
|
35 { |
|
36 } |
|
37 |
|
38 void CINC025140::ConstructL() |
|
39 { |
|
40 } |
|
41 |
|
42 CINC025140::~CINC025140() |
|
43 { |
|
44 } |
|
45 |
|
46 const TDesC& CINC025140::TestCaseName() const |
|
47 { |
|
48 _LIT(KTxtTitle, "Defect Fix INC025140"); |
|
49 return KTxtTitle(); |
|
50 } |
|
51 |
|
52 TInt CINC025140::TotalTransactionCount() const |
|
53 { |
|
54 return KTransactionCount; |
|
55 } |
|
56 |
|
57 TInt CINC025140::ConnectionCount() const |
|
58 { |
|
59 return KConnectionCount; |
|
60 } |
|
61 |
|
62 RHTTPTransaction CINC025140::GetTransactionL(TInt aIndex, RHTTPSession aSession, MHTTPTransactionCallback& aClient) |
|
63 { |
|
64 __ASSERT_ALWAYS(aIndex<KTransactionCount, User::Invariant()); |
|
65 |
|
66 RStringF method = aSession.StringPool().StringF(HTTP::EGET,RHTTPSession::GetTable()); |
|
67 _LIT8(KTxtUri, "http://127.0.0.1"); |
|
68 TUriParser8 uri; |
|
69 uri.Parse(KTxtUri()); |
|
70 return aSession.OpenTransactionL(uri, aClient, method); |
|
71 } |
|
72 |
|
73 const TDesC8& CINC025140::GetRawRequest(TInt aConnectionIndex, TInt aTransIndex) |
|
74 { |
|
75 __ASSERT_ALWAYS( (aTransIndex<KTransactionCount) && (aConnectionIndex < KConnectionCount), User::Invariant()); |
|
76 |
|
77 return KTxtRawRequest(); |
|
78 } |
|
79 |
|
80 const TDesC8& CINC025140::GetRawResponse(TInt aConnectionIndex, TInt aTransIndex) |
|
81 { |
|
82 __ASSERT_ALWAYS( (aTransIndex<KTransactionCount) && (aConnectionIndex < KConnectionCount), User::Invariant()); |
|
83 |
|
84 return KTxtRawResponse(); |
|
85 } |