## GT0128 Hurricane WAP
## WSP Protocol Handler
#######################
## Ref. SGL.GT0128.aaa.bbb WSP Protocol Handler Unit Tests
## Unit test 2.3.2.2
## Driver chat script
#
# Test Synopsis
# * Invoke GET method while disconnecting

# Expected Result
# * Expected result: Invoke is aborted


SCRIPT UnitTestDriver2.3.2.2 
#
# Sleep before start, allows stub time to start up and initialise.
#
	SLEEP 500
#
# Set the proxy info
#
	INCLUDE "C:\HttpTest\wsp_pr_hnd_driver\setproxyinfo_driver.txt"

#
# Get the session connected
#
	INCLUDE "C:\HttpTest\wsp_pr_hnd_driver\doconnect_accept_driver.txt"
#
# Get the session disconnected by the client
#
	SLEEP 500
	SEND
		INVOKE SessionDisconnectL
		ENDINVOKE
	ENDSEND
#
# Send method invoke
#
	SEND
		INVOKE OpenTransactionL
			PARAMETER aMethod GET
			PARAMETER aUri http://wap.symbian.com/
			STOREITEM :RETURN: trans1
		ENDINVOKE
		INVOKE trans1 AddHeaderL
			PARAMETER aFieldName Accept
			PARAMETER aFieldType RStringF
			PARAMETER aFieldValue application/vnd.wap.wmlc
		ENDINVOKE
		INVOKE trans1 AddHeaderL
			PARAMETER aFieldName User-Agent
			PARAMETER aFieldType RStringF
			PARAMETER aFieldValue T_WspProtHnd
		ENDINVOKE
		INVOKE trans1 SubmitL
		ENDINVOKE
	ENDSEND

#
# Expect the transaction to be aborted due session disconnecting
#
 	EXPECT
		INVOCATION TransactionRunL
			VALIDATE aTransaction trans1
			VALIDATE aEvent -7387
		ENDINVOCATION
	ENDEXPECT
	EXPECT
		INVOCATION TransactionRunL
			VALIDATE aTransaction trans1
			VALIDATE aEvent 9
		ENDINVOCATION
	ENDEXPECT
#
# Wait for ind - this is given by EDisconnected
#
	EXPECT
		INVOCATION SessionRunL
			VALIDATE aEvent EDisconnected
		ENDINVOCATION
	ENDEXPECT
#
# Give the stub a chance to finish before exiting
#
	SLEEP 500
#
# Done!
#

ENDSCRIPT


