|
1 // Copyright (c) 2004-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 // Author: Franco.Bellu@symbian.com |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 #ifndef __TC9_H__ |
|
20 #define __TC9_H__ |
|
21 |
|
22 #include "HttpTestCore.h" |
|
23 #include <http.h> |
|
24 #include "csrvaddrval.h" |
|
25 |
|
26 /** |
|
27 * BEHAVIOR TO TEST:The VF to send a RHTTPEvent::EFailed event to the client. |
|
28 * this can happen when the VF receive a 4xx or 5xx status code from the |
|
29 * Origin Server. |
|
30 * The DoRunL() function simulate one of these situations: the specified URI |
|
31 * doesn't point to any available resource.The server's response status |
|
32 * message will be 404(Not Found). |
|
33 * This will cause the VF to send an EFailed status message to the client |
|
34 * The request is Post to http://10.35.2.4/perl/wrong_resourse.txt |
|
35 * The MHFRunL() should log the EFailed status message issued by the |
|
36 * Validation Filter as soon as it gets the server's response. |
|
37 * NB: For the purpose of this test case the content of the headers and the |
|
38 * body won't be showed. |
|
39 */ |
|
40 |
|
41 class CHttpTestCase9: public CHttpTestTransBase, public MHTTPTransactionCallback |
|
42 { |
|
43 //to implement in this class' member functs definitions |
|
44 public: |
|
45 CHttpTestCase9(CScriptFile* aIniSettingsFile); |
|
46 virtual ~CHttpTestCase9(); |
|
47 |
|
48 virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent) ; |
|
49 virtual TInt MHFRunError(TInt aError,RHTTPTransaction aTransaction, const THTTPEvent& aEvent); |
|
50 private: |
|
51 const TDesC& TestName(); |
|
52 virtual void DoRunL(); |
|
53 virtual TInt RunError(TInt aErr); |
|
54 virtual void DoCancel(); |
|
55 void OpenTestSessionL(); |
|
56 void CloseTestSession(); |
|
57 // virtual const TDesC& TestName(); |
|
58 protected: |
|
59 void CompleteOwnRequest(); |
|
60 private: |
|
61 RHTTPSession iSession; |
|
62 RHTTPTransaction iTransaction; |
|
63 RStringF iIpAddr; |
|
64 /** This has the instance of the settings.ini file. This instance is passed |
|
65 to ReplaceHostNameL() function which uses this instance to retrieve the |
|
66 data from settings.ini file. |
|
67 */ |
|
68 CScriptFile* iIniSettingsFile; |
|
69 }; |
|
70 |
|
71 |
|
72 #endif |