summaryrefslogtreecommitdiffstats
path: root/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@nokia.com>2009-07-27 16:59:35 +0300
committerJukka Rissanen <jukka.rissanen@nokia.com>2009-07-27 16:59:35 +0300
commit6e3ff9826c3aea3cd63829a8a65c0311bc8eaf07 (patch)
tree5853019f2230312641a5a556aa6e73cadfe851c0 /tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
parent7e1bf91e5ace65617b7216f330c16bb56473a24c (diff)
Using IAPConf class instead of DuiGConfItem and/or DuiValueSpace (which is deprecated) in order to hide gconf details.
Statistics support added to QNetworkSession class QNetworkConfigurationManager::updateConfigurations() internal logic fixed
Diffstat (limited to 'tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp')
-rw-r--r--tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp55
1 files changed, 31 insertions, 24 deletions
diff --git a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
index 976d616e80..62f905317c 100644
--- a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
+++ b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
@@ -43,6 +43,10 @@
#include "qnetworkconfiguration.h"
#include "qnetworkconfigmanager.h"
+#ifdef MAEMO
+#include <iapconf.h>
+#endif
+
class tst_QNetworkConfigurationManager : public QObject
{
Q_OBJECT
@@ -60,6 +64,8 @@ private slots:
private:
#ifdef MAEMO
+ Maemo::IAPConf *iapconf;
+ Maemo::IAPConf *gprsiap;
QProcess *icd_stub;
#endif
};
@@ -76,24 +82,27 @@ void tst_QNetworkConfigurationManager::cleanupTestCase()
void tst_QNetworkConfigurationManager::init()
{
#ifdef MAEMO
- // Add IAP to setup
- QProcess gconftool;
- gconftool.start("gconftool-2 --recursive-unset "
- "/system/osso/connectivity/IAP/007");
- gconftool.waitForFinished();
-
- gconftool.start("gconftool-2 --set --type string "
- "/system/osso/connectivity/IAP/007/type WLAN_INFRA");
- gconftool.waitForFinished();
- gconftool.start("gconftool-2 --set --type string "
- "/system/osso/connectivity/IAP/007/wlan_ssid JamesBond");
- gconftool.waitForFinished();
- gconftool.start("gconftool-2 --set --type string "
- "/system/osso/connectivity/IAP/007/name James_Bond");
- gconftool.waitForFinished();
-
-
- // Start icd2 stub
+ iapconf = new Maemo::IAPConf("007");
+ iapconf->clear();
+ iapconf->setValue("ipv4_type", "AUTO");
+ iapconf->setValue("wlan_wepkey1", "connt");
+ iapconf->setValue("wlan_wepdefkey", 1);
+ iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
+ iapconf->setValue("name", "James Bond");
+ iapconf->setValue("type", "WLAN_INFRA");
+
+ gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
+ gprsiap->clear();
+ gprsiap->setValue("ask_password", false);
+ gprsiap->setValue("gprs_accesspointname", "internet");
+ gprsiap->setValue("gprs_password", "");
+ gprsiap->setValue("gprs_username", "");
+ gprsiap->setValue("ipv4_autodns", true);
+ gprsiap->setValue("ipv4_type", "AUTO");
+ gprsiap->setValue("sim_imsi", "244070123456789");
+ gprsiap->setValue("name", "MI6");
+ gprsiap->setValue("type", "GPRS");
+
icd_stub = new QProcess(this);
icd_stub->start("/usr/bin/icd2_stub.py");
QTest::qWait(1000);
@@ -112,13 +121,11 @@ void tst_QNetworkConfigurationManager::init()
void tst_QNetworkConfigurationManager::cleanup()
{
#ifdef MAEMO
- // Remove IAP we just added
- QProcess gconftool;
- gconftool.start("gconftool-2 --recursive-unset "
- "/system/osso/connectivity/IAP/007");
- gconftool.waitForFinished();
+ iapconf->clear();
+ delete iapconf;
+ gprsiap->clear();
+ delete gprsiap;
- // Terminate icd2 stub
icd_stub->terminate();
icd_stub->waitForFinished();
#endif