|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * This is the header file for testing Wlan Sniffer application. |
|
16 */ |
|
17 |
|
18 #ifndef T_WLANSNIFFER_H |
|
19 #define T_WLANSNIFFER_H |
|
20 |
|
21 // System includes |
|
22 |
|
23 #include <QObject> |
|
24 #include <QSharedPointer> |
|
25 |
|
26 // User includes |
|
27 |
|
28 // Forward declarations |
|
29 |
|
30 class HbListWidget; |
|
31 class WlanQtUtilsIap; |
|
32 class WlanQtUtilsAp; |
|
33 class WlanSnifferListWidget; |
|
34 |
|
35 // External data types |
|
36 |
|
37 // Constants |
|
38 |
|
39 // Class declaration |
|
40 |
|
41 class TestWlanSniffer: public QObject |
|
42 { |
|
43 Q_OBJECT |
|
44 |
|
45 private slots: |
|
46 |
|
47 // Functions from QTest framework. |
|
48 void initTestCase(); |
|
49 void cleanupTestCase(); |
|
50 void init(); |
|
51 void cleanup(); |
|
52 |
|
53 // Test functions for WlanSnifferListWidget class |
|
54 void testUpdateContentIapAdded(); |
|
55 void testUpdateContentApAdded(); |
|
56 void testUpdateContentIapRemoved(); |
|
57 void testUpdateContentApRemoved(); |
|
58 void testUpdateContentIapConnected(); |
|
59 void testUpdateContentIapDisconnected(); |
|
60 void testUpdateContentRobustness1(); |
|
61 void testUpdateContentRobustness2(); |
|
62 void testUpdateContentSort(); |
|
63 void testScrollTo(); |
|
64 |
|
65 private: |
|
66 |
|
67 // Helper functions, that is, sub test cases. |
|
68 void verifyIap(int row, int iapId); |
|
69 void verifyAp(int row, QString ssid, int securityMode); |
|
70 void appendWlanAp( |
|
71 QString ssId, |
|
72 int signalStrength, |
|
73 int networkMode, |
|
74 int securityMode); |
|
75 void appendWlanIap( |
|
76 int iapId, |
|
77 int netId, |
|
78 QString name, |
|
79 QString ssId, |
|
80 int signalStrength, |
|
81 int securityMode); |
|
82 |
|
83 private: // data |
|
84 |
|
85 HbListWidget *mListWidget; |
|
86 WlanSnifferListWidget *mWidget; |
|
87 QList< QSharedPointer<WlanQtUtilsIap> > mIaps; |
|
88 QList< QSharedPointer<WlanQtUtilsAp> > mAps; |
|
89 }; |
|
90 |
|
91 #endif // T_WLANSNIFFER_H |