kerneltest/e32test/power/t_lddpowerseqtest.cpp
changeset 280 2bfb1feef9de
parent 0 a41df078684a
child 286 48e57fb1237e
--- a/kerneltest/e32test/power/t_lddpowerseqtest.cpp	Mon Oct 04 12:03:52 2010 +0100
+++ b/kerneltest/e32test/power/t_lddpowerseqtest.cpp	Mon Oct 04 12:15:59 2010 +0100
@@ -78,11 +78,11 @@
 	User::WaitForRequest(statuspowerdown1);
 	test(statuspowerdown1.Int() == KErrNone);
 
-	test.Printf(_L("Waiting for power up request completion of handler1\n"));
+	test.Printf(_L("Waiting for power down request completion of handler1\n"));
 	User::WaitForRequest(statuspowerdown2);
 	test(statuspowerdown2.Int() == KErrNone);
 
-	test.Printf(_L("Waiting for power down request completion of handler2\n"));
+	test.Printf(_L("Waiting for power up request completion of handler2\n"));
 	User::WaitForRequest(statuspowerup1);
 	test(statuspowerup1.Int() == KErrNone);
 
@@ -94,6 +94,24 @@
 	User::WaitForRequest(tstatus);
 	test(tstatus.Int() == KErrNone);
 
+	test.Printf(_L("Set power manager shut down timeout value\n"));
+	ldd.Test_setPowerDownTimeout(10);
+
+	test.Printf(_L("Instruct power handler 2 to act dead\n"));
+	ldd.Test_power2ActDead();
+
+	test.Printf(_L("Enable wakeup power events to standby\n"));
+	r = Power::EnableWakeupEvents(EPwStandby);
+	test (r == KErrNone);
+
+	wakeup.HomeTime();
+	wakeup += TTimeIntervalMicroSeconds(5000000);
+	timer.At(tstatus, wakeup);
+
+	test.Printf(_L("Powerdown\n"));
+	r = Power::PowerDown();
+	test (r == KErrNone);
+
 	timer.Close();
 
 	test(time_power2down >= time_power1down + timeInterval);