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: Main test class for hspluginmodel library.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <HbIcon>
|
|
19 |
#include "t_caclient.h"
|
|
20 |
#include "caservice.h"
|
|
21 |
#include "caquery.h"
|
|
22 |
#include "calocalizationentry.h"
|
|
23 |
#include "camenuiconutility.h"
|
|
24 |
|
|
25 |
|
|
26 |
// ---------------------------------------------------------------------------
|
|
27 |
//
|
|
28 |
// ---------------------------------------------------------------------------
|
|
29 |
//
|
|
30 |
void TestCaClient::Test_getEntryIcon()
|
|
31 |
{
|
|
32 |
{
|
|
33 |
CaEntry entry;
|
|
34 |
entry.setEntryTypeName(QString("application"));
|
|
35 |
QSizeF size(50,50);
|
|
36 |
|
|
37 |
HbIcon icon = CaMenuIconUtility::getEntryIcon(entry, size);
|
|
38 |
QVERIFY(icon.size().isValid());
|
|
39 |
QVERIFY(icon.height() > 0);
|
|
40 |
QVERIFY(icon.width() > 0);
|
|
41 |
}
|
|
42 |
}
|
|
43 |
|
|
44 |
// ---------------------------------------------------------------------------
|
|
45 |
//
|
|
46 |
// ---------------------------------------------------------------------------
|
|
47 |
//
|
|
48 |
void TestCaClient::Test_getApplicationIcon()
|
|
49 |
{
|
|
50 |
{
|
|
51 |
int uid = 270495019; // contest mbm icon
|
|
52 |
QSizeF size(50,50);
|
|
53 |
|
|
54 |
HbIcon icon = CaMenuIconUtility::getApplicationIcon(uid,size);
|
|
55 |
|
|
56 |
QVERIFY(icon.size().isValid());
|
|
57 |
QVERIFY(icon.height() > 0);
|
|
58 |
QVERIFY(icon.width() > 0);
|
|
59 |
|
|
60 |
int uid2 = 537006483; // AknConf mif icon
|
|
61 |
HbIcon icon2 = CaMenuIconUtility::getApplicationIcon(uid2,size);
|
|
62 |
QVERIFY(icon2.size().isValid());
|
|
63 |
}
|
|
64 |
}
|
|
65 |
|