## GT0128 Hurricane WAP
## WSP Protocol Handler
#######################
## Ref. SGL.GT0128.aaa.bbb WSP Protocol Handler Unit Tests
## Unit test 2.4.1.3
## Driver chat script
#
# Test Synopsis
# * Abort GET method after receiving result ind

# Expected Result
# * Expected result: The method invocation gets aborted after the result ind has been received


SCRIPT UnitTestDriver2.4.1.3 

#
# 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"
#
# Invoke a get methods
#
	SLEEP 500
	INCLUDE "C:\HttpTest\wsp_pr_hnd_driver\trans1_get_driver.txt"
#
# Wait for S-MethodResult.ind - this is indicated by the EGotResponseHeaders event
#
	EXPECT
		INVOCATION TransactionRunL
			VALIDATE aTransaction trans1
			VALIDATE aEvent EGotResponseHeaders
		ENDINVOCATION
	ENDEXPECT
#
# ...then the body data event
#
	EXPECT
		INVOCATION TransactionRunL
			VALIDATE aTransaction trans1
			VALIDATE aEvent EGotResponseBodyData
		ENDINVOCATION
	ENDEXPECT
#
# Check the status code and the content-type header and server header
#
	SLEEP 500
	SEND
		INVOKE trans1 GetStatusCode
			VALIDATE :RETURN: 200
		ENDINVOKE
		INVOKE trans1 GetHeaderL
			PARAMETER aFieldName Content-Type
			VALIDATE aFieldType RStringF
			VALIDATE aFieldValue application/vnd.wap.wmlc
			PARAMETER aPart 0
			VALIDATE :RETURN: ETrue
		ENDINVOKE
		INVOKE trans1 GetHeaderL
			PARAMETER aFieldName Server
			VALIDATE aFieldType RStringF
			VALIDATE aFieldValue bunny
			PARAMETER aPart 0
			VALIDATE :RETURN: ETrue
		ENDINVOKE
	ENDSEND
#
# Client aborts the method transaction
#
	SEND
		INVOKE trans1 Cancel
		ENDINVOKE
	ENDSEND
#
# Client closes the transaction
#
	SLEEP 500
	SEND
		INVOKE trans1 Close
		ENDINVOKE
	ENDSEND
#
# Ask for disconnect
# 
	SLEEP 500
	INCLUDE "C:\HttpTest\wsp_pr_hnd_driver\do_clientdisconnect_driver.txt"
#
# Give the stub a chance to finish before exiting
#
	SLEEP 500
#
# Done!
#

ENDSCRIPT


