125
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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 |
*
|
|
16 |
*/
|
|
17 |
#ifndef T_TSTASKSETTINGS_H
|
|
18 |
#define T_TSTASKSETTINGS_H
|
|
19 |
|
|
20 |
#include <QObject>
|
|
21 |
#include <QSharedPointer>
|
|
22 |
#include <QPixmap>
|
|
23 |
|
|
24 |
#include "tstaskmonitor.h"
|
|
25 |
#include "tstasksettings.h"
|
|
26 |
|
|
27 |
/**
|
|
28 |
* @test Test class for TsTaskSettings
|
|
29 |
*/
|
|
30 |
class T_TsTaskSettings : public QObject
|
|
31 |
{
|
|
32 |
Q_OBJECT
|
|
33 |
|
|
34 |
private slots:
|
|
35 |
void initTestCase();
|
|
36 |
void testRegisteringScreenshotTriggersTaskListChangeSignal();
|
|
37 |
void testUnregisteringScreenshotTriggersTaskListChangeSignal();
|
|
38 |
void testIconIsReturnedAfterUnregisteringScreenshot();
|
|
39 |
void testRegisteringEmptyPixmapReturnsFalse();
|
|
40 |
void testRegisteringTheSameScreenshotTwiceTriggersTaskListChangeSignal();
|
|
41 |
void testRegisteringOverwritesOldScreenshot();
|
|
42 |
void testRegisteringFailsIfHigherPriorityScreenshotIsRegistered();
|
|
43 |
|
|
44 |
void testChangingVisibilityOfApplication();
|
|
45 |
|
|
46 |
private:
|
|
47 |
QSharedPointer<TsTask> unitTestTask();
|
|
48 |
QPixmap imageWithCircle();
|
|
49 |
bool registerHighPriorityScreenshot(const QPixmap &screenshot);
|
|
50 |
|
|
51 |
private:
|
|
52 |
TsTaskSettings mTaskSettings;
|
|
53 |
TsTaskMonitor mTaskMonitor;
|
|
54 |
|
|
55 |
};
|
|
56 |
|
|
57 |
#endif //T_TSTASKSETTINGS_H
|