applayerprotocols/httptransportfw/Test/Acceptance/Iter1/Tc10.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     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 __TC10_H__
       
    20 #define __TC10_H__
       
    21 
       
    22 #include "HttpTestCore.h"
       
    23 #include <http.h>
       
    24 #include "csrvaddrval.h"
       
    25 
       
    26 /** 
       
    27  * BEHAVIOR TO TEST:The VF to ignore a RHTTPEvent coming from the client in 2 
       
    28  * possible situation:
       
    29  * 1)There is an unknown request header( in this test case 'UnknownHeader: 
       
    30  * UnknownHeader:').
       
    31  * 2)The Uid of an event sent by the client(RHHTPEvent.iUID) is not KHTTPUid( 
       
    32  * in this test case 0x1000A440).
       
    33  * The DoRunL() function  simulates these 2  situations in 2 sequenced 
       
    34  * transactions:
       
    35  * In OpenTestTransaction1() a the unknown header is sent in the request
       
    36  * In OpenTestTransaction2()
       
    37  * The fact that the VF ignores can be prooved  checking the 
       
    38  * HttpValidationFilterLogging.txt log file produced by the VF in the 
       
    39  * \c\Logs\Httpth directory. The VF should not log any message sending but 
       
    40  * just  messagges received passivelly.
       
    41  * The MHFRunL() should not log tany status message from the VF.
       
    42  * NB: For the purpose of this test case the content of the headers and the 
       
    43  * body won't be showed.
       
    44  */
       
    45 
       
    46 class CHttpTestCase10: public CHttpTestTransBase, public MHTTPTransactionCallback
       
    47 	{
       
    48 	//to implement in this class' member functs definitions
       
    49 public:
       
    50 	CHttpTestCase10(CScriptFile* aIniSettingsFile);
       
    51 	virtual ~CHttpTestCase10();
       
    52 
       
    53 	virtual void MHFRunL(RHTTPTransaction aTransaction,
       
    54 					const THTTPEvent& aEvent);
       
    55 	virtual TInt MHFRunError(TInt aError,RHTTPTransaction aTransaction,
       
    56 					const THTTPEvent& aEvent);
       
    57 private:	
       
    58 	const TDesC& TestName();
       
    59 	virtual void DoRunL();
       
    60 	virtual TInt RunError(TInt aErr);
       
    61 	virtual void DoCancel();	
       
    62 	void OpenTestTransaction1L();
       
    63 	void CloseTestTransaction1();
       
    64 	void OpenTestTransaction2L();
       
    65 	void CloseTestTransaction2();
       
    66 //	virtual const TDesC& TestName();
       
    67 protected:
       
    68 	void CompleteOwnRequest();
       
    69 private:
       
    70 	RHTTPSession iSession;
       
    71 	RHTTPTransaction iTransaction;
       
    72 	RStringF iIpAddr;
       
    73 	RStringF iUnknownHeader;
       
    74 	/** This has the instance of the settings.ini file.  This instance is passed
       
    75 	 to ReplaceHostNameL() function which uses this instance to retrieve the
       
    76 	 data from settings.ini file.
       
    77 	 */
       
    78 	CScriptFile* iIniSettingsFile;
       
    79 	};
       
    80 
       
    81 #endif