equal
deleted
inserted
replaced
14 * Description: |
14 * Description: |
15 * WLAN Wizard UT. |
15 * WLAN Wizard UT. |
16 */ |
16 */ |
17 |
17 |
18 // System includes |
18 // System includes |
|
19 |
|
20 #include <HbParameterLengthLimiter> |
|
21 |
19 #include <QTest> |
22 #include <QTest> |
20 #include <QDebug> |
23 #include <QDebug> |
21 #include <QList> |
24 #include <QList> |
|
25 |
22 #include <cmmanagerdefines_shim.h> |
26 #include <cmmanagerdefines_shim.h> |
23 #include <wlanerrorcodes.h> |
27 #include <wlanerrorcodes.h> |
24 #include <HbParameterLengthLimiter> |
|
25 |
28 |
26 // User includes |
29 // User includes |
|
30 |
27 #include "testwlanwizardeap.h" |
31 #include "testwlanwizardeap.h" |
28 #include "testwlanwizardeap_conf.h" |
32 #include "testwlanwizardeap_conf.h" |
29 #include "hbautotest.h" |
33 #include "hbautotest.h" |
30 #include "wlanwizard.h" |
34 #include "wlanwizard.h" |
31 #include "wlanwizard_p.h" |
35 #include "wlanwizard_p.h" |
58 const QString ssid("tc_eap_outer_page_orientation_change"); |
62 const QString ssid("tc_eap_outer_page_orientation_change"); |
59 |
63 |
60 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
64 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
61 |
65 |
62 mView->mWizard->setParameters( |
66 mView->mWizard->setParameters( |
63 ssid, |
67 ssid, |
|
68 ssid.toUtf8(), |
64 CMManagerShim::Infra, |
69 CMManagerShim::Infra, |
65 CMManagerShim::WlanSecModeWpa2, |
70 CMManagerShim::WlanSecModeWpa2, |
66 false, |
71 false, |
67 false); |
72 false); |
68 |
73 |
110 mEapQtUtilsContext->createLeap(username,password); |
115 mEapQtUtilsContext->createLeap(username,password); |
111 |
116 |
112 const QString ssid("tc_eap_leap"); |
117 const QString ssid("tc_eap_leap"); |
113 |
118 |
114 mView->mWizard->setParameters( |
119 mView->mWizard->setParameters( |
115 ssid, |
120 ssid, |
|
121 ssid.toUtf8(), |
116 CMManagerShim::Infra, |
122 CMManagerShim::Infra, |
117 CMManagerShim::WlanSecModeWpa, |
123 CMManagerShim::WlanSecModeWpa, |
118 false, |
124 false, |
119 false); |
125 false); |
120 |
126 |
553 mEapQtUtilsContext->setConfigurationReference(3, true); |
559 mEapQtUtilsContext->setConfigurationReference(3, true); |
554 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
560 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
555 mEapQtUtilsContext->setSelectectedOuterTypesReturn(false); |
561 mEapQtUtilsContext->setSelectectedOuterTypesReturn(false); |
556 |
562 |
557 mView->mWizard->setParameters( |
563 mView->mWizard->setParameters( |
558 ssid, |
564 ssid, |
|
565 ssid.toUtf8(), |
559 CMManagerShim::Infra, |
566 CMManagerShim::Infra, |
560 CMManagerShim::WlanSecModeWpa2, |
567 CMManagerShim::WlanSecModeWpa2, |
561 false, |
568 false, |
562 false); |
569 false); |
563 |
570 |
588 mEapQtUtilsContext->setConfigurationReference(3, true); |
595 mEapQtUtilsContext->setConfigurationReference(3, true); |
589 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
596 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
590 mEapQtUtilsContext->setOuterConfigReturn(false); |
597 mEapQtUtilsContext->setOuterConfigReturn(false); |
591 |
598 |
592 mView->mWizard->setParameters( |
599 mView->mWizard->setParameters( |
593 ssid, |
600 ssid, |
|
601 ssid.toUtf8(), |
594 CMManagerShim::Infra, |
602 CMManagerShim::Infra, |
595 CMManagerShim::WlanSecModeWpa2, |
603 CMManagerShim::WlanSecModeWpa2, |
596 false, |
604 false, |
597 false); |
605 false); |
598 |
606 |
622 |
630 |
623 mEapQtUtilsContext->setConfigurationReference(3, false); |
631 mEapQtUtilsContext->setConfigurationReference(3, false); |
624 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
632 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
625 |
633 |
626 mView->mWizard->setParameters( |
634 mView->mWizard->setParameters( |
627 ssid, |
635 ssid, |
|
636 ssid.toUtf8(), |
628 CMManagerShim::Infra, |
637 CMManagerShim::Infra, |
629 CMManagerShim::WlanSecModeWpa2, |
638 CMManagerShim::WlanSecModeWpa2, |
630 false, |
639 false, |
631 false); |
640 false); |
632 |
641 |
688 EapQtExpandedEapType::TypePeap, EapQtConfig::Username); |
697 EapQtExpandedEapType::TypePeap, EapQtConfig::Username); |
689 EapQtValidatorStub* validatorRealm = (EapQtValidatorStub*)mEapQtUtilsContext->validator( |
698 EapQtValidatorStub* validatorRealm = (EapQtValidatorStub*)mEapQtUtilsContext->validator( |
690 EapQtExpandedEapType::TypePeap,EapQtConfig::Realm); |
699 EapQtExpandedEapType::TypePeap,EapQtConfig::Realm); |
691 |
700 |
692 mView->mWizard->setParameters( |
701 mView->mWizard->setParameters( |
693 ssid, |
702 ssid, |
|
703 ssid.toUtf8(), |
694 CMManagerShim::Infra, |
704 CMManagerShim::Infra, |
695 CMManagerShim::WlanSecModeWpa, |
705 CMManagerShim::WlanSecModeWpa, |
696 false, |
706 false, |
697 false); |
707 false); |
698 |
708 |
774 EapQtExpandedEapType::TypeLeap, EapQtConfig::Password); |
784 EapQtExpandedEapType::TypeLeap, EapQtConfig::Password); |
775 validatorUser->setReturnValue(EapQtValidator::StatusInvalid); |
785 validatorUser->setReturnValue(EapQtValidator::StatusInvalid); |
776 validatorPassword->setReturnValue(EapQtValidator::StatusInvalid); |
786 validatorPassword->setReturnValue(EapQtValidator::StatusInvalid); |
777 |
787 |
778 mView->mWizard->setParameters( |
788 mView->mWizard->setParameters( |
779 ssid, |
789 ssid, |
|
790 ssid.toUtf8(), |
780 CMManagerShim::Infra, |
791 CMManagerShim::Infra, |
781 CMManagerShim::WlanSecModeWpa, |
792 CMManagerShim::WlanSecModeWpa, |
782 false, |
793 false, |
783 false); |
794 false); |
784 |
795 |
829 0, |
840 0, |
830 userCerts, |
841 userCerts, |
831 -1); |
842 -1); |
832 |
843 |
833 mView->mWizard->setParameters( |
844 mView->mWizard->setParameters( |
834 ssid, |
845 ssid, |
|
846 ssid.toUtf8(), |
835 CMManagerShim::Infra, |
847 CMManagerShim::Infra, |
836 CMManagerShim::WlanSecModeWpa2, |
848 CMManagerShim::WlanSecModeWpa2, |
837 false, |
849 false, |
838 false); |
850 false); |
839 |
851 |
873 0, |
885 0, |
874 userCerts, |
886 userCerts, |
875 0); |
887 0); |
876 |
888 |
877 mView->mWizard->setParameters( |
889 mView->mWizard->setParameters( |
878 ssid, |
890 ssid, |
|
891 ssid.toUtf8(), |
879 CMManagerShim::Infra, |
892 CMManagerShim::Infra, |
880 CMManagerShim::WlanSecModeWpa2, |
893 CMManagerShim::WlanSecModeWpa2, |
881 false, |
894 false, |
882 false); |
895 false); |
883 |
896 |
937 0, |
950 0, |
938 userCerts, |
951 userCerts, |
939 1); |
952 1); |
940 |
953 |
941 mView->mWizard->setParameters( |
954 mView->mWizard->setParameters( |
942 ssid, |
955 ssid, |
|
956 ssid.toUtf8(), |
943 CMManagerShim::Infra, |
957 CMManagerShim::Infra, |
944 CMManagerShim::WlanSecModeWpa2, |
958 CMManagerShim::WlanSecModeWpa2, |
945 false, |
959 false, |
946 false); |
960 false); |
947 |
961 |
1003 0, |
1017 0, |
1004 userCerts, |
1018 userCerts, |
1005 0); |
1019 0); |
1006 |
1020 |
1007 mView->mWizard->setParameters( |
1021 mView->mWizard->setParameters( |
1008 ssid, |
1022 ssid, |
|
1023 ssid.toUtf8(), |
1009 CMManagerShim::Infra, |
1024 CMManagerShim::Infra, |
1010 CMManagerShim::WlanSecModeWpa2, |
1025 CMManagerShim::WlanSecModeWpa2, |
1011 false, |
1026 false, |
1012 false); |
1027 false); |
1013 |
1028 |
1147 EapQtPluginHandle::PluginEapMschapv2, |
1162 EapQtPluginHandle::PluginEapMschapv2, |
1148 "u", |
1163 "u", |
1149 "p"); |
1164 "p"); |
1150 |
1165 |
1151 mView->mWizard->setParameters( |
1166 mView->mWizard->setParameters( |
1152 ssid, |
1167 ssid, |
|
1168 ssid.toUtf8(), |
1153 CMManagerShim::Infra, |
1169 CMManagerShim::Infra, |
1154 CMManagerShim::WlanSecModeWpa, |
1170 CMManagerShim::WlanSecModeWpa, |
1155 false, |
1171 false, |
1156 false); |
1172 false); |
1157 |
1173 |
1203 EapQtPluginHandle::PluginEapMschapv2, |
1219 EapQtPluginHandle::PluginEapMschapv2, |
1204 username, |
1220 username, |
1205 password); |
1221 password); |
1206 |
1222 |
1207 mView->mWizard->setParameters( |
1223 mView->mWizard->setParameters( |
1208 ssid, |
1224 ssid, |
|
1225 ssid.toUtf8(), |
1209 CMManagerShim::Infra, |
1226 CMManagerShim::Infra, |
1210 CMManagerShim::WlanSecModeWpa, |
1227 CMManagerShim::WlanSecModeWpa, |
1211 false, |
1228 false, |
1212 false); |
1229 false); |
1213 |
1230 |
1271 EapQtPluginHandle::PluginEapMschapv2, |
1288 EapQtPluginHandle::PluginEapMschapv2, |
1272 "u", |
1289 "u", |
1273 "p"); |
1290 "p"); |
1274 |
1291 |
1275 mView->mWizard->setParameters( |
1292 mView->mWizard->setParameters( |
1276 ssid, |
1293 ssid, |
|
1294 ssid.toUtf8(), |
1277 CMManagerShim::Infra, |
1295 CMManagerShim::Infra, |
1278 CMManagerShim::WlanSecModeWpa, |
1296 CMManagerShim::WlanSecModeWpa, |
1279 false, |
1297 false, |
1280 false); |
1298 false); |
1281 |
1299 |
1336 EapQtPluginHandle::PluginEapMschapv2, |
1354 EapQtPluginHandle::PluginEapMschapv2, |
1337 username, |
1355 username, |
1338 password); |
1356 password); |
1339 |
1357 |
1340 mView->mWizard->setParameters( |
1358 mView->mWizard->setParameters( |
1341 ssid, |
1359 ssid, |
|
1360 ssid.toUtf8(), |
1342 CMManagerShim::Infra, |
1361 CMManagerShim::Infra, |
1343 CMManagerShim::WlanSecModeWpa, |
1362 CMManagerShim::WlanSecModeWpa, |
1344 false, |
1363 false, |
1345 false); |
1364 false); |
1346 |
1365 |
1609 mEapQtUtilsContext->createEapAkaSim(type); |
1628 mEapQtUtilsContext->createEapAkaSim(type); |
1610 |
1629 |
1611 const QString ssid("tc_eap_aka_sim"); |
1630 const QString ssid("tc_eap_aka_sim"); |
1612 |
1631 |
1613 mView->mWizard->setParameters( |
1632 mView->mWizard->setParameters( |
1614 ssid, |
1633 ssid, |
|
1634 ssid.toUtf8(), |
1615 CMManagerShim::Infra, |
1635 CMManagerShim::Infra, |
1616 CMManagerShim::WlanSecMode802_1x, |
1636 CMManagerShim::WlanSecMode802_1x, |
1617 false, |
1637 false, |
1618 false); |
1638 false); |
1619 |
1639 |
1677 password); |
1697 password); |
1678 |
1698 |
1679 mEapQtUtilsContext->setInnerConfigReturn(saveInnerConfReturn); |
1699 mEapQtUtilsContext->setInnerConfigReturn(saveInnerConfReturn); |
1680 |
1700 |
1681 mView->mWizard->setParameters( |
1701 mView->mWizard->setParameters( |
1682 ssid, |
1702 ssid, |
|
1703 ssid.toUtf8(), |
1683 CMManagerShim::Infra, |
1704 CMManagerShim::Infra, |
1684 CMManagerShim::WlanSecModeWpa, |
1705 CMManagerShim::WlanSecModeWpa, |
1685 false, |
1706 false, |
1686 false); |
1707 false); |
1687 |
1708 |
1734 |
1755 |
1735 mEapQtUtilsContext->setConfigurationReference(3, true); |
1756 mEapQtUtilsContext->setConfigurationReference(3, true); |
1736 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
1757 mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka); |
1737 |
1758 |
1738 mView->mWizard->setParameters( |
1759 mView->mWizard->setParameters( |
1739 ssid, |
1760 ssid, |
|
1761 ssid.toUtf8(), |
1740 CMManagerShim::Infra, |
1762 CMManagerShim::Infra, |
1741 CMManagerShim::WlanSecModeWpa2, |
1763 CMManagerShim::WlanSecModeWpa2, |
1742 false, |
1764 false, |
1743 false); |
1765 false); |
1744 |
1766 |
1790 EapQtPluginHandle::PluginEapMschapv2, |
1812 EapQtPluginHandle::PluginEapMschapv2, |
1791 username, |
1813 username, |
1792 password); |
1814 password); |
1793 |
1815 |
1794 mView->mWizard->setParameters( |
1816 mView->mWizard->setParameters( |
1795 ssid, |
1817 ssid, |
|
1818 ssid.toUtf8(), |
1796 CMManagerShim::Infra, |
1819 CMManagerShim::Infra, |
1797 CMManagerShim::WlanSecModeWpa, |
1820 CMManagerShim::WlanSecModeWpa, |
1798 false, |
1821 false, |
1799 false); |
1822 false); |
1800 |
1823 |