qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp
branchRCL_3
changeset 6 eb34711bcc75
parent 3 87be51aa5b5b
child 10 4ea83c148e84
equal deleted inserted replaced
3:87be51aa5b5b 6:eb34711bcc75
    69 public slots:
    69 public slots:
    70     void initTestCase();
    70     void initTestCase();
    71     void cleanupTestCase();
    71     void cleanupTestCase();
    72 
    72 
    73 private slots:
    73 private slots:
       
    74 
       
    75     void robustnessBombing();
    74 
    76 
    75     void outOfProcessSession();
    77     void outOfProcessSession();
    76     void invalidSession();
    78     void invalidSession();
    77 
    79 
    78     void repeatedOpenClose_data();
    80     void repeatedOpenClose_data();
   226 
   228 
   227     icd_stub->terminate();
   229     icd_stub->terminate();
   228     icd_stub->waitForFinished();
   230     icd_stub->waitForFinished();
   229 #endif
   231 #endif
   230 }
   232 }
       
   233 
       
   234 // Robustness test for calling interfaces in nonsense order / with nonsense parameters
       
   235 void tst_QNetworkSession::robustnessBombing() 
       
   236 {
       
   237     QNetworkConfigurationManager mgr;
       
   238     QNetworkSession testSession(mgr.defaultConfiguration());
       
   239     // Should not reset even session is not opened
       
   240     testSession.migrate();
       
   241     testSession.accept();
       
   242     testSession.ignore();
       
   243     testSession.reject();
       
   244     quint64 temp;
       
   245     temp = testSession.bytesWritten();
       
   246     temp = testSession.bytesReceived();
       
   247     temp = testSession.activeTime();
       
   248 }
       
   249 
   231 
   250 
   232 void tst_QNetworkSession::invalidSession()
   251 void tst_QNetworkSession::invalidSession()
   233 {
   252 {
   234     // 1. Verify that session created with invalid configuration remains in invalid state
   253     // 1. Verify that session created with invalid configuration remains in invalid state
   235     QNetworkSession session(QNetworkConfiguration(), 0);
   254     QNetworkSession session(QNetworkConfiguration(), 0);