1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
333 TEST(starterSession.Handle() == SsmCmnWrapper::SsmStateManagerHandle()); |
333 TEST(starterSession.Handle() == SsmCmnWrapper::SsmStateManagerHandle()); |
334 |
334 |
335 INFO_PRINTF1(_L("Deleting splash screen property")); |
335 INFO_PRINTF1(_L("Deleting splash screen property")); |
336 ret = RProperty::Delete(KPSUidStartup, KPSSplashShutdown); |
336 ret = RProperty::Delete(KPSUidStartup, KPSSplashShutdown); |
337 TEST(ret == KErrNone || ret == KErrNotFound); |
337 TEST(ret == KErrNone || ret == KErrNotFound); |
338 INFO_PRINTF2(_L("ret val is : %d"), ret); |
|
339 |
338 |
340 |
339 |
341 INFO_PRINTF1(_L("Ending splashscreen without defining property")); |
340 INFO_PRINTF1(_L("Ending splashscreen without defining property")); |
342 ret = starterSession.EndSplashScreen(); |
341 ret = starterSession.EndSplashScreen(); |
343 TEST(ret == KErrNotFound); |
342 TEST(ret == KErrNotFound); |
344 INFO_PRINTF2(_L("ret val is : %d"), ret); |
|
345 |
343 |
346 INFO_PRINTF1(_L("Defining splash screen property")); |
344 INFO_PRINTF1(_L("Defining splash screen property")); |
347 // In a test enviroment we don't need to worry about protecting the property |
345 // In a test enviroment we don't need to worry about protecting the property |
348 // so allow anything to change it |
346 // so allow anything to change it |
349 _LIT_SECURITY_POLICY_PASS(KAllPass); //lint !e648 Suppress overflow in computing constant for operation |
347 _LIT_SECURITY_POLICY_PASS(KAllPass); //lint !e648 Suppress overflow in computing constant for operation |
350 ret = RProperty::Define(KPSUidStartup, KPSSplashShutdown, RProperty::EInt, KAllPass, KAllPass); |
348 ret = RProperty::Define(KPSUidStartup, KPSSplashShutdown, RProperty::EInt, KAllPass, KAllPass); |
351 INFO_PRINTF3(_L("KPSUidStartup = %x, KPSSplashShutdown = %x"), KPSUidStartup, KPSSplashShutdown); |
349 TEST(ret == KErrNone); |
352 TEST(ret == KErrNone); |
|
353 INFO_PRINTF2(_L("ret val is : %d"), ret); |
|
354 |
350 |
355 INFO_PRINTF1(_L("Ending splashscreen with property defined")); |
351 INFO_PRINTF1(_L("Ending splashscreen with property defined")); |
356 ret = starterSession.EndSplashScreen(); |
352 ret = starterSession.EndSplashScreen(); |
357 TEST(ret == KErrNone); |
353 TEST(ret == KErrNone); |
358 INFO_PRINTF2(_L("ret val is : %d"), ret); |
|
359 |
354 |
360 INFO_PRINTF1(_L("Reading splash screen property")); |
355 INFO_PRINTF1(_L("Reading splash screen property")); |
361 TInt value; |
356 TInt value; |
362 ret = RProperty::Get(KPSUidStartup, KPSSplashShutdown, value); |
357 ret = RProperty::Get(KPSUidStartup, KPSSplashShutdown, value); |
363 TEST(ret == KErrNone); |
358 TEST(ret == KErrNone); |
364 INFO_PRINTF2(_L("ret val is : %d"), ret); |
|
365 TEST(value == ESplashShutdown); |
359 TEST(value == ESplashShutdown); |
366 INFO_PRINTF3(_L("Property value is : %d .Expected : %d"), ret, ESplashShutdown); |
|
367 |
360 |
368 INFO_PRINTF1(_L("Close on connected RStartSession")); |
361 INFO_PRINTF1(_L("Close on connected RStartSession")); |
369 starterSession.Close(); |
362 starterSession.Close(); |
370 TEST(starterSession.Handle() == KNullHandle); |
363 TEST(starterSession.Handle() == KNullHandle); |
371 |
364 |