sl@0
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#include "..\EcomTestUtils\EcomTestUtils.h"
|
sl@0
|
17 |
#include <e32test.h>
|
sl@0
|
18 |
#include <Ecom\ECom.h>
|
sl@0
|
19 |
#include <Ecom\ImplementationInformation.h>
|
sl@0
|
20 |
#include <hal.h>
|
sl@0
|
21 |
#include <bautils.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
TUid KUidMultipeImageInterface = { 0x10282307 };
|
sl@0
|
24 |
static RFs TheFs;
|
sl@0
|
25 |
static RTest TheTest(_L("t_multipleImageTest.exe"));
|
sl@0
|
26 |
|
sl@0
|
27 |
#ifndef SYMBIAN_DISTINCT_LOCALE_MODEL
|
sl@0
|
28 |
_LIT(KEnglishLocale, "elocl.01");
|
sl@0
|
29 |
_LIT(KFrenchLocale, "elocl.02");
|
sl@0
|
30 |
_LIT(KGermanLocale, "elocl.03");
|
sl@0
|
31 |
#else
|
sl@0
|
32 |
// refer base/os/kernelhwsrv/kernel/eka/euser/locmapping.cpp
|
sl@0
|
33 |
// Language
|
sl@0
|
34 |
_LIT(KEComEnglishLang,"elocl_lan.001");
|
sl@0
|
35 |
_LIT(KEComFrenchLang,"elocl_lan.002");
|
sl@0
|
36 |
_LIT(KEComGermanLang,"elocl_lan.003");
|
sl@0
|
37 |
// Region
|
sl@0
|
38 |
_LIT(KEComEnglishReg,"elocl_reg.826");
|
sl@0
|
39 |
_LIT(KEComFrenchReg,"elocl_reg.250");
|
sl@0
|
40 |
_LIT(KEComGermanReg,"elocl_reg.276");
|
sl@0
|
41 |
// Collation
|
sl@0
|
42 |
_LIT(KEComEnglishColl,"elocl_col.001");
|
sl@0
|
43 |
_LIT(KEComFrenchColl,"elocl_col.002");
|
sl@0
|
44 |
_LIT(KEComGermanColl,"elocl_col.003");
|
sl@0
|
45 |
#endif
|
sl@0
|
46 |
|
sl@0
|
47 |
// Test Macroes and Functions
|
sl@0
|
48 |
static void Check(TInt aValue, TInt aLine)
|
sl@0
|
49 |
{
|
sl@0
|
50 |
if(!aValue)
|
sl@0
|
51 |
{
|
sl@0
|
52 |
TheTest(EFalse, aLine);
|
sl@0
|
53 |
}
|
sl@0
|
54 |
}
|
sl@0
|
55 |
|
sl@0
|
56 |
static void Check(TInt aValue, TInt aExpected, TInt aLine)
|
sl@0
|
57 |
{
|
sl@0
|
58 |
if(aValue != aExpected)
|
sl@0
|
59 |
{
|
sl@0
|
60 |
RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
|
sl@0
|
61 |
TheTest(EFalse, aLine);
|
sl@0
|
62 |
}
|
sl@0
|
63 |
}
|
sl@0
|
64 |
#define TEST(arg) ::Check((arg), __LINE__)
|
sl@0
|
65 |
#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
|
sl@0
|
66 |
|
sl@0
|
67 |
// Type definition for test functions.
|
sl@0
|
68 |
// Used in calling t_multipleImageTest functions.
|
sl@0
|
69 |
typedef void (*FuncPtrL) (TLanguage* , TPtrC* );
|
sl@0
|
70 |
|
sl@0
|
71 |
void KillEComServerL()
|
sl@0
|
72 |
{
|
sl@0
|
73 |
//Need to ensure that the EComServer process is killed before even starting this test by using
|
sl@0
|
74 |
//the EComTestUtils library
|
sl@0
|
75 |
_LIT(KEComServerProcessName,"ecomserver");
|
sl@0
|
76 |
TRAPD(error, EComTestUtils::KillProcessL(KEComServerProcessName));
|
sl@0
|
77 |
TEST2(error, KErrNone);
|
sl@0
|
78 |
}
|
sl@0
|
79 |
|
sl@0
|
80 |
void SetLanguageDowngradeL(TLanguage* aLanguages)
|
sl@0
|
81 |
{
|
sl@0
|
82 |
TLocale locale;
|
sl@0
|
83 |
|
sl@0
|
84 |
TInt i=0;
|
sl@0
|
85 |
RArray<TLanguage> languageArray;
|
sl@0
|
86 |
|
sl@0
|
87 |
TLanguage lang = User::Language();
|
sl@0
|
88 |
|
sl@0
|
89 |
if(lang != aLanguages[0])
|
sl@0
|
90 |
{
|
sl@0
|
91 |
TExtendedLocale extendedLocale;
|
sl@0
|
92 |
extendedLocale.LoadSystemSettings();
|
sl@0
|
93 |
|
sl@0
|
94 |
if(aLanguages[0] == ELangEnglish)
|
sl@0
|
95 |
{
|
sl@0
|
96 |
#ifndef SYMBIAN_DISTINCT_LOCALE_MODEL
|
sl@0
|
97 |
extendedLocale.LoadLocale(KEnglishLocale);
|
sl@0
|
98 |
#else
|
sl@0
|
99 |
extendedLocale.LoadLocale(KEComEnglishLang,KEComEnglishReg,KEComEnglishColl);
|
sl@0
|
100 |
#endif
|
sl@0
|
101 |
}
|
sl@0
|
102 |
else if(aLanguages[0] == ELangFrench)
|
sl@0
|
103 |
{
|
sl@0
|
104 |
#ifndef SYMBIAN_DISTINCT_LOCALE_MODEL
|
sl@0
|
105 |
extendedLocale.LoadLocale(KFrenchLocale);
|
sl@0
|
106 |
#else
|
sl@0
|
107 |
extendedLocale.LoadLocale(KEComFrenchLang,KEComFrenchReg,KEComFrenchColl);
|
sl@0
|
108 |
#endif
|
sl@0
|
109 |
}
|
sl@0
|
110 |
else if(aLanguages[0] == ELangGerman)
|
sl@0
|
111 |
{
|
sl@0
|
112 |
#ifndef SYMBIAN_DISTINCT_LOCALE_MODEL
|
sl@0
|
113 |
extendedLocale.LoadLocale(KGermanLocale);
|
sl@0
|
114 |
#else
|
sl@0
|
115 |
extendedLocale.LoadLocale(KEComGermanLang,KEComGermanReg,KEComGermanColl);
|
sl@0
|
116 |
#endif
|
sl@0
|
117 |
}
|
sl@0
|
118 |
else
|
sl@0
|
119 |
{
|
sl@0
|
120 |
__ASSERT_ALWAYS(EFalse, User::Leave(KErrNotSupported)); //Unexpected test language
|
sl@0
|
121 |
}
|
sl@0
|
122 |
|
sl@0
|
123 |
// Save the changes to system settings
|
sl@0
|
124 |
extendedLocale.SaveSystemSettings();
|
sl@0
|
125 |
|
sl@0
|
126 |
TEST(User::Language() == aLanguages[0]);
|
sl@0
|
127 |
}
|
sl@0
|
128 |
|
sl@0
|
129 |
for(i=1; aLanguages[i] != ELangNone && i < KMaxDowngradeLanguages; i++)
|
sl@0
|
130 |
{
|
sl@0
|
131 |
locale.SetLanguageDowngrade(i, aLanguages[i]);
|
sl@0
|
132 |
}
|
sl@0
|
133 |
|
sl@0
|
134 |
locale.Set();
|
sl@0
|
135 |
|
sl@0
|
136 |
BaflUtils::GetDowngradePathL(TheFs, aLanguages[0], languageArray);
|
sl@0
|
137 |
|
sl@0
|
138 |
for(i = languageArray.Count() - 1; i >= 0; i--)
|
sl@0
|
139 |
{
|
sl@0
|
140 |
TLanguage language = languageArray[i];
|
sl@0
|
141 |
TheTest.Printf(_L("Updated language downgrade[%d]: %d\n"), i, language);
|
sl@0
|
142 |
TEST2(languageArray[i], aLanguages[i]);
|
sl@0
|
143 |
}
|
sl@0
|
144 |
|
sl@0
|
145 |
languageArray.Close();
|
sl@0
|
146 |
}
|
sl@0
|
147 |
|
sl@0
|
148 |
/**
|
sl@0
|
149 |
@SYMTestCaseID SYSLIB-ECOM-CT-1694
|
sl@0
|
150 |
@SYMTestCaseDesc Test that ECOM lists the expected plugins under different language downgrade path settings
|
sl@0
|
151 |
@SYMTestPriority High
|
sl@0
|
152 |
@SYMTestActions Set the language downgrade path.Kill ECOM server to ensure ECOM uses the new downgrade path
|
sl@0
|
153 |
next time it starts. List implementations. Check that the list contains the expected plugins.
|
sl@0
|
154 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
155 |
@SYMREQ CR0759
|
sl@0
|
156 |
*/
|
sl@0
|
157 |
void ListImplementationsL(TLanguage* aLanguageDowngradePath, TPtrC* aExpectedImplementations)
|
sl@0
|
158 |
{
|
sl@0
|
159 |
//set the language downgrade path
|
sl@0
|
160 |
SetLanguageDowngradeL(aLanguageDowngradePath);
|
sl@0
|
161 |
//kill ecom server to ensure the use of updated language downgrade path
|
sl@0
|
162 |
KillEComServerL();
|
sl@0
|
163 |
|
sl@0
|
164 |
RImplInfoPtrArray implementations;
|
sl@0
|
165 |
TRAPD(err, REComSession::ListImplementationsL(KUidMultipeImageInterface, implementations));
|
sl@0
|
166 |
TEST2(err, KErrNone);
|
sl@0
|
167 |
|
sl@0
|
168 |
const TInt implementationCount = implementations.Count();
|
sl@0
|
169 |
TheTest.Printf(_L("Found %d implementations.\n"), implementationCount);
|
sl@0
|
170 |
|
sl@0
|
171 |
for (TInt i=0; i<implementationCount; i++)
|
sl@0
|
172 |
{
|
sl@0
|
173 |
const CImplementationInformation* info = implementations[i];
|
sl@0
|
174 |
TheTest.Printf(_L("Implementation[%d]: UID=0x%x DisplayName=\"%S\"\n"), i, (info->ImplementationUid()).iUid, &(info->DisplayName())) ;
|
sl@0
|
175 |
TEST(info->DisplayName() == aExpectedImplementations[i]);
|
sl@0
|
176 |
}
|
sl@0
|
177 |
|
sl@0
|
178 |
// Empty the array of implementations to avoid leaks
|
sl@0
|
179 |
implementations.ResetAndDestroy();
|
sl@0
|
180 |
//close the ecom session to avoid leaks
|
sl@0
|
181 |
REComSession::FinalClose();
|
sl@0
|
182 |
}
|
sl@0
|
183 |
|
sl@0
|
184 |
|
sl@0
|
185 |
LOCAL_C void DoBasicTestL(FuncPtrL testFuncL, TLanguage* aLanguageDowngradePath, TPtrC* aExpectedImplementations, const TDesC& aTestDesc)
|
sl@0
|
186 |
{
|
sl@0
|
187 |
TheTest.Next(aTestDesc);
|
sl@0
|
188 |
|
sl@0
|
189 |
__UHEAP_MARK;
|
sl@0
|
190 |
// find out the number of open handles
|
sl@0
|
191 |
TInt startProcessHandleCount;
|
sl@0
|
192 |
TInt startThreadHandleCount;
|
sl@0
|
193 |
RThread().HandleCount(startProcessHandleCount, startThreadHandleCount);
|
sl@0
|
194 |
|
sl@0
|
195 |
testFuncL(aLanguageDowngradePath, aExpectedImplementations);
|
sl@0
|
196 |
|
sl@0
|
197 |
// check that no handles have leaked
|
sl@0
|
198 |
TInt endProcessHandleCount;
|
sl@0
|
199 |
TInt endThreadHandleCount;
|
sl@0
|
200 |
RThread().HandleCount(endProcessHandleCount, endThreadHandleCount);
|
sl@0
|
201 |
|
sl@0
|
202 |
TEST(startProcessHandleCount == endProcessHandleCount);
|
sl@0
|
203 |
TEST(startThreadHandleCount == endThreadHandleCount);
|
sl@0
|
204 |
|
sl@0
|
205 |
__UHEAP_MARKEND;
|
sl@0
|
206 |
}
|
sl@0
|
207 |
|
sl@0
|
208 |
|
sl@0
|
209 |
LOCAL_C void DoTestsL()
|
sl@0
|
210 |
{
|
sl@0
|
211 |
const TLanguage languageDowngradePath[][7] =
|
sl@0
|
212 |
{
|
sl@0
|
213 |
{ELangEnglish, ELangFrench, ELangGerman, ELangNone},
|
sl@0
|
214 |
{ELangFrench, ELangGerman, ELangEnglish, ELangNone},
|
sl@0
|
215 |
{ELangGerman, ELangFrench, ELangEnglish, ELangNone},
|
sl@0
|
216 |
{ELangFrench, ELangGerman, ELangNone, ELangNone},
|
sl@0
|
217 |
{ELangGerman, ELangFrench, ELangNone, ELangNone},
|
sl@0
|
218 |
{ELangFrench, ELangNone, ELangNone, ELangNone},
|
sl@0
|
219 |
{ELangGerman, ELangNone, ELangNone, ELangNone}
|
sl@0
|
220 |
};
|
sl@0
|
221 |
|
sl@0
|
222 |
const TPtrC pluginResolution[][16] =
|
sl@0
|
223 |
{
|
sl@0
|
224 |
{
|
sl@0
|
225 |
_L("Example B Image 2 Language 01 UK English"),
|
sl@0
|
226 |
_L("Example C Image 2 Language 01 UK English"),
|
sl@0
|
227 |
_L("Example E Image 2 Language 02 French"),
|
sl@0
|
228 |
_L("Example F Image 2 Language 02 French"),
|
sl@0
|
229 |
_L("Example G Image 1 Language 02 French"),
|
sl@0
|
230 |
_L("Example H Image 1 Language 03 German"),
|
sl@0
|
231 |
_L("Example I Image 1 Language 02 French"),
|
sl@0
|
232 |
_L("Example J Image 1 Language 03 German"),
|
sl@0
|
233 |
_L("Example K Image 2 Language 02 French"),
|
sl@0
|
234 |
_L("Example L Image 2 Language 03 German"),
|
sl@0
|
235 |
_L("Example M Image 2 Language 02 French"),
|
sl@0
|
236 |
_L("Example N Image 2 Language 03 German"),
|
sl@0
|
237 |
_L("Example O Image 2 Language 02 French"),
|
sl@0
|
238 |
_L("Example P Image 2 Language 03 German"),
|
sl@0
|
239 |
_L("Example Q Image 2 Language 02 French"),
|
sl@0
|
240 |
_L("Example S Image 1 Language 02 French")
|
sl@0
|
241 |
},
|
sl@0
|
242 |
{
|
sl@0
|
243 |
_L("Example B Image 2 Language 01 UK English"),
|
sl@0
|
244 |
_L("Example C Image 2 Language 01 UK English"),
|
sl@0
|
245 |
_L("Example E Image 2 Language 02 French"),
|
sl@0
|
246 |
_L("Example F Image 2 Language 02 French"),
|
sl@0
|
247 |
_L("Example G Image 1 Language 02 French"),
|
sl@0
|
248 |
_L("Example H Image 1 Language 03 German"),
|
sl@0
|
249 |
_L("Example I Image 1 Language 02 French"),
|
sl@0
|
250 |
_L("Example J Image 1 Language 03 German"),
|
sl@0
|
251 |
_L("Example K Image 2 Language 02 French"),
|
sl@0
|
252 |
_L("Example L Image 2 Language 03 German"),
|
sl@0
|
253 |
_L("Example M Image 2 Language 02 French"),
|
sl@0
|
254 |
_L("Example N Image 2 Language 03 German"),
|
sl@0
|
255 |
_L("Example O Image 2 Language 02 French"),
|
sl@0
|
256 |
_L("Example P Image 2 Language 03 German"),
|
sl@0
|
257 |
_L("Example Q Image 2 Language 02 French"),
|
sl@0
|
258 |
_L("Example S Image 1 Language 02 French")
|
sl@0
|
259 |
},
|
sl@0
|
260 |
{
|
sl@0
|
261 |
_L("Example B Image 2 Language 01 UK English"),
|
sl@0
|
262 |
_L("Example C Image 2 Language 01 UK English"),
|
sl@0
|
263 |
_L("Example E Image 2 Language 02 French"),
|
sl@0
|
264 |
_L("Example F Image 2 Language 02 French"),
|
sl@0
|
265 |
_L("Example G Image 1 Language 03 German"),
|
sl@0
|
266 |
_L("Example H Image 1 Language 03 German"),
|
sl@0
|
267 |
_L("Example I Image 1 Language 03 German"),
|
sl@0
|
268 |
_L("Example J Image 1 Language 03 German"),
|
sl@0
|
269 |
_L("Example K Image 2 Language 03 German"),
|
sl@0
|
270 |
_L("Example L Image 2 Language 03 German"),
|
sl@0
|
271 |
_L("Example M Image 2 Language 03 German"),
|
sl@0
|
272 |
_L("Example N Image 2 Language 03 German"),
|
sl@0
|
273 |
_L("Example O Image 2 Language 03 German"),
|
sl@0
|
274 |
_L("Example P Image 2 Language 03 German"),
|
sl@0
|
275 |
_L("Example Q Image 2 Language 03 German"),
|
sl@0
|
276 |
_L("Example S Image 2 Language 03 German")
|
sl@0
|
277 |
},
|
sl@0
|
278 |
{
|
sl@0
|
279 |
_L("Example B Image 2 Language 01 UK English"),
|
sl@0
|
280 |
_L("Example C Image 2 Language 01 UK English"),
|
sl@0
|
281 |
_L("Example E Image 2 Language 02 French"),
|
sl@0
|
282 |
_L("Example F Image 2 Language 02 French"),
|
sl@0
|
283 |
_L("Example G Image 1 Language 02 French"),
|
sl@0
|
284 |
_L("Example H Image 1 Language 03 German"),
|
sl@0
|
285 |
_L("Example I Image 1 Language 02 French"),
|
sl@0
|
286 |
_L("Example J Image 1 Language 03 German"),
|
sl@0
|
287 |
_L("Example K Image 2 Language 02 French"),
|
sl@0
|
288 |
_L("Example L Image 2 Language 03 German"),
|
sl@0
|
289 |
_L("Example M Image 2 Language 02 French"),
|
sl@0
|
290 |
_L("Example N Image 2 Language 03 German"),
|
sl@0
|
291 |
_L("Example O Image 2 Language 02 French"),
|
sl@0
|
292 |
_L("Example P Image 2 Language 03 German"),
|
sl@0
|
293 |
_L("Example Q Image 2 Language 02 French"),
|
sl@0
|
294 |
_L("Example S Image 1 Language 02 French")
|
sl@0
|
295 |
},
|
sl@0
|
296 |
{
|
sl@0
|
297 |
_L("Example B Image 2 Language 01 UK English"),
|
sl@0
|
298 |
_L("Example C Image 2 Language 01 UK English"),
|
sl@0
|
299 |
_L("Example E Image 2 Language 02 French"),
|
sl@0
|
300 |
_L("Example F Image 2 Language 02 French"),
|
sl@0
|
301 |
_L("Example G Image 1 Language 03 German"),
|
sl@0
|
302 |
_L("Example H Image 1 Language 03 German"),
|
sl@0
|
303 |
_L("Example I Image 1 Language 03 German"),
|
sl@0
|
304 |
_L("Example J Image 1 Language 03 German"),
|
sl@0
|
305 |
_L("Example K Image 2 Language 03 German"),
|
sl@0
|
306 |
_L("Example L Image 2 Language 03 German"),
|
sl@0
|
307 |
_L("Example M Image 2 Language 03 German"),
|
sl@0
|
308 |
_L("Example N Image 2 Language 03 German"),
|
sl@0
|
309 |
_L("Example O Image 2 Language 03 German"),
|
sl@0
|
310 |
_L("Example P Image 2 Language 03 German"),
|
sl@0
|
311 |
_L("Example Q Image 2 Language 03 German"),
|
sl@0
|
312 |
_L("Example S Image 2 Language 03 German")
|
sl@0
|
313 |
},
|
sl@0
|
314 |
{
|
sl@0
|
315 |
_L("Example B Image 2 Language 01 UK English"),
|
sl@0
|
316 |
_L("Example C Image 2 Language 01 UK English"),
|
sl@0
|
317 |
_L("Example E Image 2 Language 02 French"),
|
sl@0
|
318 |
_L("Example F Image 2 Language 02 French"),
|
sl@0
|
319 |
_L("Example G Image 1 Language 02 French"),
|
sl@0
|
320 |
_L("Example H Image 1 Language 01 UK English"),
|
sl@0
|
321 |
_L("Example I Image 1 Language 02 French"),
|
sl@0
|
322 |
_L("Example K Image 2 Language 02 French"),
|
sl@0
|
323 |
_L("Example L Image 2 Language 01 UK English"),
|
sl@0
|
324 |
_L("Example M Image 2 Language 02 French"),
|
sl@0
|
325 |
_L("Example O Image 2 Language 02 French"),
|
sl@0
|
326 |
_L("Example P Image 2 Language 01 UK English"),
|
sl@0
|
327 |
_L("Example Q Image 2 Language 02 French"),
|
sl@0
|
328 |
_L("Example S Image 1 Language 02 French"),
|
sl@0
|
329 |
_L("Dummy"),
|
sl@0
|
330 |
_L("Dummy")
|
sl@0
|
331 |
},
|
sl@0
|
332 |
{
|
sl@0
|
333 |
_L("Example B Image 2 Language 01 UK English"),
|
sl@0
|
334 |
_L("Example C Image 2 Language 01 UK English"),
|
sl@0
|
335 |
_L("Example G Image 1 Language 03 German"),
|
sl@0
|
336 |
_L("Example H Image 1 Language 03 German"),
|
sl@0
|
337 |
_L("Example I Image 1 Language 03 German"),
|
sl@0
|
338 |
_L("Example J Image 1 Language 03 German"),
|
sl@0
|
339 |
_L("Example K Image 2 Language 03 German"),
|
sl@0
|
340 |
_L("Example L Image 2 Language 03 German"),
|
sl@0
|
341 |
_L("Example M Image 2 Language 03 German"),
|
sl@0
|
342 |
_L("Example N Image 2 Language 03 German"),
|
sl@0
|
343 |
_L("Example O Image 2 Language 03 German"),
|
sl@0
|
344 |
_L("Example P Image 2 Language 03 German"),
|
sl@0
|
345 |
_L("Example Q Image 2 Language 03 German"),
|
sl@0
|
346 |
_L("Example S Image 2 Language 03 German"),
|
sl@0
|
347 |
_L("Dummy"),
|
sl@0
|
348 |
_L("Dummy")
|
sl@0
|
349 |
}
|
sl@0
|
350 |
};
|
sl@0
|
351 |
|
sl@0
|
352 |
//make a copy of the current locale
|
sl@0
|
353 |
TLocale oldLocale;
|
sl@0
|
354 |
|
sl@0
|
355 |
TRAPD(err,
|
sl@0
|
356 |
{
|
sl@0
|
357 |
DoBasicTestL(&ListImplementationsL,
|
sl@0
|
358 |
(TLanguage*)languageDowngradePath[0],
|
sl@0
|
359 |
(TPtrC*)pluginResolution[0],
|
sl@0
|
360 |
_L("Check Installed Plugins for Downgrade Path English-French-German"));
|
sl@0
|
361 |
|
sl@0
|
362 |
oldLocale.Set();
|
sl@0
|
363 |
|
sl@0
|
364 |
DoBasicTestL(&ListImplementationsL,
|
sl@0
|
365 |
(TLanguage*)languageDowngradePath[1],
|
sl@0
|
366 |
(TPtrC*)pluginResolution[1],
|
sl@0
|
367 |
_L("Check Installed Plugins for Downgrade Path French-German-English"));
|
sl@0
|
368 |
|
sl@0
|
369 |
oldLocale.Set();
|
sl@0
|
370 |
|
sl@0
|
371 |
DoBasicTestL(&ListImplementationsL,
|
sl@0
|
372 |
(TLanguage*)languageDowngradePath[2],
|
sl@0
|
373 |
(TPtrC*)pluginResolution[2],
|
sl@0
|
374 |
_L("Check Installed Plugins for Downgrade Path German-French-English"));
|
sl@0
|
375 |
|
sl@0
|
376 |
oldLocale.Set();
|
sl@0
|
377 |
|
sl@0
|
378 |
DoBasicTestL(&ListImplementationsL,
|
sl@0
|
379 |
(TLanguage*)languageDowngradePath[3],
|
sl@0
|
380 |
(TPtrC*)pluginResolution[3],
|
sl@0
|
381 |
_L("Check Installed Plugins for Downgrade Path French-German"));
|
sl@0
|
382 |
|
sl@0
|
383 |
oldLocale.Set();
|
sl@0
|
384 |
|
sl@0
|
385 |
DoBasicTestL(&ListImplementationsL,
|
sl@0
|
386 |
(TLanguage*)languageDowngradePath[4],
|
sl@0
|
387 |
(TPtrC*)pluginResolution[4],
|
sl@0
|
388 |
_L("Check Installed Plugins for Downgrade Path German-French"));
|
sl@0
|
389 |
|
sl@0
|
390 |
oldLocale.Set();
|
sl@0
|
391 |
|
sl@0
|
392 |
DoBasicTestL(&ListImplementationsL,
|
sl@0
|
393 |
(TLanguage*)languageDowngradePath[5],
|
sl@0
|
394 |
(TPtrC*)pluginResolution[5],
|
sl@0
|
395 |
_L("Check Installed Plugins for Downgrade Path French"));
|
sl@0
|
396 |
|
sl@0
|
397 |
oldLocale.Set();
|
sl@0
|
398 |
|
sl@0
|
399 |
DoBasicTestL(&ListImplementationsL,
|
sl@0
|
400 |
(TLanguage*)languageDowngradePath[6],
|
sl@0
|
401 |
(TPtrC*)pluginResolution[6],
|
sl@0
|
402 |
_L("Check Installed Plugins for Downgrade Path German"));
|
sl@0
|
403 |
}
|
sl@0
|
404 |
);
|
sl@0
|
405 |
TExtendedLocale extendedLocale;
|
sl@0
|
406 |
extendedLocale.LoadSystemSettings();
|
sl@0
|
407 |
#ifndef SYMBIAN_DISTINCT_LOCALE_MODEL
|
sl@0
|
408 |
// Change the locale to Default Locale, all settings from single Dll
|
sl@0
|
409 |
extendedLocale.LoadLocale(KEnglishLocale);
|
sl@0
|
410 |
#else
|
sl@0
|
411 |
extendedLocale.LoadLocale(KEComEnglishLang,KEComEnglishReg,KEComEnglishColl);
|
sl@0
|
412 |
#endif
|
sl@0
|
413 |
|
sl@0
|
414 |
// Save the changes to system settings
|
sl@0
|
415 |
extendedLocale.SaveSystemSettings();
|
sl@0
|
416 |
|
sl@0
|
417 |
//reset locale
|
sl@0
|
418 |
oldLocale.Set();
|
sl@0
|
419 |
|
sl@0
|
420 |
if(err != KErrNone)
|
sl@0
|
421 |
{
|
sl@0
|
422 |
User::Leave(err);
|
sl@0
|
423 |
}
|
sl@0
|
424 |
}
|
sl@0
|
425 |
|
sl@0
|
426 |
|
sl@0
|
427 |
GLDEF_C TInt E32Main()
|
sl@0
|
428 |
{
|
sl@0
|
429 |
__UHEAP_MARK;
|
sl@0
|
430 |
TheTest.Printf(_L("\n"));
|
sl@0
|
431 |
TheTest.Title();
|
sl@0
|
432 |
TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-ECOM-CT-1694 MultipleImageTests "));
|
sl@0
|
433 |
|
sl@0
|
434 |
TEST2(TheFs.Connect(), KErrNone);
|
sl@0
|
435 |
|
sl@0
|
436 |
// get clean-up stack
|
sl@0
|
437 |
CTrapCleanup* cleanup = CTrapCleanup::New();
|
sl@0
|
438 |
// Construct and install the Active Scheduler. The Active Scheduler is needed
|
sl@0
|
439 |
// by components used by this test as they are ActiveObjects.
|
sl@0
|
440 |
CActiveScheduler* activeScheduler = new(ELeave)CActiveScheduler;
|
sl@0
|
441 |
CActiveScheduler::Install(activeScheduler);
|
sl@0
|
442 |
|
sl@0
|
443 |
TRAPD(err,DoTestsL());
|
sl@0
|
444 |
TEST2(err, KErrNone);
|
sl@0
|
445 |
|
sl@0
|
446 |
//delete scheduler;
|
sl@0
|
447 |
delete activeScheduler;
|
sl@0
|
448 |
delete cleanup;
|
sl@0
|
449 |
|
sl@0
|
450 |
TheFs.Close();
|
sl@0
|
451 |
|
sl@0
|
452 |
TheTest.End();
|
sl@0
|
453 |
TheTest.Close();
|
sl@0
|
454 |
|
sl@0
|
455 |
__UHEAP_MARKEND;
|
sl@0
|
456 |
|
sl@0
|
457 |
User::Heap().Check();
|
sl@0
|
458 |
|
sl@0
|
459 |
return KErrNone;
|
sl@0
|
460 |
}
|
sl@0
|
461 |
|
sl@0
|
462 |
|