|
45
|
1 |
/*
|
|
|
2 |
* Copyright (c) 2002 - 2007 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: test AknPopupFader.h
|
|
|
15 |
*
|
|
|
16 |
*/
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
// [INCLUDE FILES]
|
|
|
21 |
|
|
|
22 |
#include <aknform.h>
|
|
|
23 |
#include <testsdkpopups.rsg>
|
|
|
24 |
|
|
|
25 |
#include "testsdkpopups.h"
|
|
|
26 |
#include "testsdkpopupspf.h"
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
|
30 |
|
|
|
31 |
// -----------------------------------------------------------------------------
|
|
|
32 |
// CTestSDKPopups::TestMFCCountFadedComponentsL
|
|
|
33 |
// -----------------------------------------------------------------------------
|
|
|
34 |
//
|
|
|
35 |
TInt CTestSDKPopups::TestMFCCountFadedComponentsL( CStifItemParser& /*aItem*/ )
|
|
|
36 |
{
|
|
|
37 |
CTestSDKPopupsPF* fadedComponent = new (ELeave) CTestSDKPopupsPF;
|
|
|
38 |
CleanupStack::PushL( fadedComponent );
|
|
|
39 |
STIF_ASSERT_NOT_NULL( fadedComponent );
|
|
|
40 |
|
|
|
41 |
TInt count = fadedComponent->CountFadedComponents();
|
|
|
42 |
STIF_ASSERT_EQUALS( 0, count );
|
|
|
43 |
|
|
|
44 |
CleanupStack::PopAndDestroy( fadedComponent );
|
|
|
45 |
|
|
|
46 |
return KErrNone;
|
|
|
47 |
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
// -----------------------------------------------------------------------------
|
|
|
51 |
// CTestSDKPopups::TestMFCFadedComponentL
|
|
|
52 |
// -----------------------------------------------------------------------------
|
|
|
53 |
//
|
|
|
54 |
TInt CTestSDKPopups::TestMFCFadedComponentL( CStifItemParser& /*aItem*/ )
|
|
|
55 |
{
|
|
|
56 |
CTestSDKPopupsPF* fadedComponent = new (ELeave) CTestSDKPopupsPF;
|
|
|
57 |
CleanupStack::PushL( fadedComponent );
|
|
|
58 |
STIF_ASSERT_NOT_NULL( fadedComponent );
|
|
|
59 |
|
|
|
60 |
CCoeControl* control = fadedComponent->FadedComponent( 0 );
|
|
|
61 |
STIF_ASSERT_NULL( control );
|
|
|
62 |
|
|
|
63 |
CleanupStack::PopAndDestroy( fadedComponent );
|
|
|
64 |
|
|
|
65 |
return KErrNone;
|
|
|
66 |
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
// -----------------------------------------------------------------------------
|
|
|
70 |
// CTestSDKPopups::TestTPFFadeBehindPopupL
|
|
|
71 |
// -----------------------------------------------------------------------------
|
|
|
72 |
//
|
|
|
73 |
TInt CTestSDKPopups::TestTPFFadeBehindPopupL( CStifItemParser& /*aItem*/ )
|
|
|
74 |
{
|
|
|
75 |
CAknForm* form = new( ELeave ) CAknForm();
|
|
|
76 |
CleanupStack::PushL( form );
|
|
|
77 |
STIF_ASSERT_NOT_NULL( form );
|
|
|
78 |
CleanupStack::Pop( form );
|
|
|
79 |
form->PrepareLC( R_TESTSDK_FORM_DIALOG );
|
|
|
80 |
|
|
|
81 |
TAknPopupFader fader;
|
|
|
82 |
fader.FadeBehindPopup( form, NULL, ETrue );
|
|
|
83 |
|
|
|
84 |
CleanupStack::PopAndDestroy( form );
|
|
|
85 |
return KErrNone;
|
|
|
86 |
|
|
|
87 |
}
|