Mercurial > trustbridge
annotate ui/tests/nsstest.h @ 440:a7163018de2f
Fixed check on return value when trying to write temp file.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 22 Apr 2014 16:26:16 +0200 |
parents | 17e1c8f37d72 |
children | dcb014e7d32f |
rev | line source |
---|---|
404 | 1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU GPL (v>=2) | |
5 * and comes with ABSOLUTELY NO WARRANTY! | |
6 * See LICENSE.txt for details. | |
7 */ | |
304
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
8 #ifndef NSSTEST_H |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
9 #define NSSTEST_H |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
10 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
11 #include <QTemporaryFile> |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
12 #include <QTemporaryDir> |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
13 #include <QObject> |
307
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
14 #include <QList> |
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
15 #include <QByteArray> |
304
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
16 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
17 #include "certificatelist.h" |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
18 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
19 class NSSTest: public QObject |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
20 { |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
21 Q_OBJECT |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
22 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
23 QTemporaryDir fakeHome; |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
24 QDir fakeFirefoxDir; |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
25 QDir fakeThunderbirdDir; |
307
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
26 QTemporaryDir ffNSSDir; |
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
27 QTemporaryDir tbNSSDir; |
304
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
28 CertificateList validList; |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
29 QTemporaryFile validListFile; |
307
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
30 private: |
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
31 QList<QByteArray> get_nss_certs(QTemporaryDir *nssDir); |
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
32 void setupTestDir(QTemporaryDir *nssDir); |
304
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
33 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
34 private Q_SLOTS: |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
35 void initTestCase(); |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
36 void testInstRemove(); |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
37 }; |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
38 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
39 #endif // NSSTEST_H |