## GT0128 Hurricane WAP
## WSP Protocol Handler
#######################
## Ref. SGL.GT0128.aaa.bbb WSP Protocol Handler Unit Tests
## Unit test 2.1.4.1
## Driver chat script
#
# Test Synopsis
# * Connect while in Connecting state
# The function ConnectReq will be called 

# Expected Result
# * Expected result: the original connection connects successfully, while the second request results in the EAlreadyConnecting event


SCRIPT UnitTestDriver2.1.4.1 

#
# 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"

ECHO "Driver Sending Connect"
	SEND
		INVOKE SessionConnectL
		ENDINVOKE
	ENDSEND

#
# Do another connect. Since we are in the connecting state there should be no action
#
	ECHO "Driver Sending Connect"
	SEND
		ALLOWREENTRANCY
		INVOKE SessionConnectL
		ENDINVOKE
	ENDSEND

#
# Expect the Already Conneting event
#
	EXPECT
		INVOCATION SessionRunL
			VALIDATE aEvent EAlreadyConnecting
		ENDINVOCATION
	ENDEXPECT

#
# Wait for the cnf - this is given by EConnectedOK event
#
	ECHO "Waiting for cnf"
	EXPECT
		INVOCATION SessionRunL
			VALIDATE aEvent EConnectedOK
		ENDINVOCATION
	ENDEXPECT
#
# 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


