applayerprotocols/httpservice/test/httpservicetest/ctesthttpclientstep.cpp
branchRCL_3
changeset 7 337070b4fa18
parent 0 b16258d2340f
child 9 2611c08ee28e
equal deleted inserted replaced
3:5ee1d9ce5878 7:337070b4fa18
    20 #include <escapeutils.h>
    20 #include <escapeutils.h>
    21 #include <thttphdrval.h>
    21 #include <thttphdrval.h>
    22 #include "httptestutils.h"
    22 #include "httptestutils.h"
    23 #include "clocaltestserver.h"
    23 #include "clocaltestserver.h"
    24 #include "chttpclienttestparams.h"
    24 #include "chttpclienttestparams.h"
       
    25 #include "ctesthttpserviceauthentication.h"
    25 
    26 
    26 _LIT(KTestCaseName, "TestCaseName");
    27 _LIT(KTestCaseName, "TestCaseName");
    27 _LIT8(KUserAgent, "HTTP Client API Test");
    28 _LIT8(KUserAgent, "HTTP Client API Test");
    28 _LIT(KTestHttpClientAPITestTitle, "HTTP client API Unit Test Harness");
    29 _LIT(KTestHttpClientAPITestTitle, "HTTP client API Unit Test Harness");
    29 const TInt KMaxNoOfConnections = 6;
    30 const TInt KMaxNoOfConnections = 6;
    41     delete iHttpClient;
    42     delete iHttpClient;
    42     delete iTestServer;
    43     delete iTestServer;
    43     delete iTestUtils;    
    44     delete iTestUtils;    
    44     delete iTestParamArray;
    45     delete iTestParamArray;
    45     delete iActiveScheduler;
    46     delete iActiveScheduler;
       
    47     delete iTestHttpServiceAuthentication;
    46     }
    48     }
    47 
    49 
    48 // TEF virtuals
    50 // TEF virtuals
    49 TVerdict CTestHttpClientStep::doTestStepPreambleL()
    51 TVerdict CTestHttpClientStep::doTestStepPreambleL()
    50     {
    52     {
    97             {
    99             {
    98             User::Leave(KErrCorrupt);
   100             User::Leave(KErrCorrupt);
    99             }
   101             }
   100         }
   102         }
   101     
   103     
       
   104     if(param->IsAuthenticationReqd())
       
   105         {
       
   106         iTestHttpServiceAuthentication = new CTestHttpServiceAuthentication();
       
   107         User::LeaveIfError(iHttpClient->SetAuthentication(iTestHttpServiceAuthentication));
       
   108         }
       
   109   
   102     if(param->Method().CompareF(KGetMethod) == 0)
   110     if(param->Method().CompareF(KGetMethod) == 0)
   103         {
   111         {
   104         if(param->OnlineTest())
   112         if(param->OnlineTest())
   105             {
   113             {
   106             iHttpTrans = CTestClientHttpOnlineGet::NewL(*param, *this, *iHttpClient, param->Uri(), iTestUtils);
   114             iHttpTrans = CTestClientHttpOnlineGet::NewL(*param, *this, *iHttpClient, param->Uri(), iTestUtils);