applayerprotocols/httpservice/test/httpservicetest/ctesthttpclientstep.cpp
branchRCL_3
changeset 7 2611c08ee28e
parent 5 337070b4fa18
child 12 f21293830889
--- a/applayerprotocols/httpservice/test/httpservicetest/ctesthttpclientstep.cpp	Mon Mar 15 12:42:40 2010 +0200
+++ b/applayerprotocols/httpservice/test/httpservicetest/ctesthttpclientstep.cpp	Wed Mar 31 22:32:15 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -19,10 +19,12 @@
 #include "ctestclienthttppost.h"
 #include <escapeutils.h>
 #include <thttphdrval.h>
+#include <commdbconnpref.h>
 #include "httptestutils.h"
 #include "clocaltestserver.h"
 #include "chttpclienttestparams.h"
 #include "ctesthttpserviceauthentication.h"
+#include "chttpnetworkconnectioninfo.h"
 
 _LIT(KTestCaseName, "TestCaseName");
 _LIT8(KUserAgent, "HTTP Client API Test");
@@ -50,14 +52,21 @@
 // TEF virtuals
 TVerdict CTestHttpClientStep::doTestStepPreambleL()
     {
+    TInt status;
     iActiveScheduler = new (ELeave) CActiveScheduler();
     CActiveScheduler::Install(iActiveScheduler);
     iTestParamArray = new(ELeave) CHttpClientTestParamArray;
     iTestUtils = CHTTPTestUtils::NewL(KTestHttpClientAPITestTitle());
-    iTestUtils->InitCommsL();
+    
     
     iTestServer = CLocalTestServer::NewL(*iTestUtils, *this, *iTestParamArray);
     iHttpClient = CHttpService::NewL();
+    TCommDbConnPref connPref;
+    connPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
+    connPref.SetIapId(1);
+    connPref.SetNetId(0);
+    iHttpConnInfo = iHttpClient->HttpNetworkConnection();
+    status = iHttpConnInfo->Start();
     THttpHeaderValueVariant variant(KUserAgent());
     if(iHttpClient->AddRequestHeader(HTTP::EUserAgent, variant))
         {
@@ -134,12 +143,10 @@
         {
         iHttpTrans->SetNoRetry();
         }
-    
     if(param->ResponseTimeoutEnable())
         {
         iHttpTrans->SetResponseTimeout(10);
         }
-    
     const RPointerArray<CHeaderInfo>& info = param->RequestHeaderInfos();
     for(TInt i = 0; i < info.Count(); ++i)
         {
@@ -169,7 +176,7 @@
                     THTTPHdrVal::TQConv q(value);
                     TInt val2 = q;
                     THttpHeaderValueVariant variant2(val2);
-                    // Set the header with the param
+                    /// Set the header with the param
                     iHttpTrans->AddRequestHeader(headerName, variant, paramName, variant2);
                     }
                 }