diff -r f72a12da539e -r 5315654608de widgetmanager/tsrc/wmunittest/conf/ui_wmunittest.cfg --- a/widgetmanager/tsrc/wmunittest/conf/ui_wmunittest.cfg Thu Dec 17 08:40:49 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,776 +0,0 @@ -//------------------------------------------------------------------------------- -// constants -//------------------------------------------------------------------------------- -// -[Define] - -TRUE 1 -FALSE 0 - -OK 0 -FAIL -1 - -MAX_WIDGET_AMOUNT 1000 // non-functional requirement - -EUnrecognized 0 -EUidIcon 1 -ESvgIcon 2 -ESkinIcon 3 -EMifIcon 4 -ESkinAndMifIcon 5 -EImageIcon 6 - -[Enddefine] - -//------------------------------------------------------------------------------- -// Test cases for the plugin -//------------------------------------------------------------------------------- -// - - -// Tests WmPlugin construction -[Test] -title WmPlugin create/delete -create wmunittest test -test HeapSet -test PluginCreate -pause 500 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -// Heap usage logging -[Test] -title WmPlugin memcon test -create wmunittest test -test HeapSet -test LogHeap "before wm" -test PluginCreate -test LogHeap "wm Active" -// -test SetMass 10 -test PluginActivate -pause 500 -test LogHeap "10 widgets" -// -test SetMass 20 -test PluginWidgetsChanged -pause 250 -test LogHeap "20 widgets" -// -test SetMass 30 -test PluginWidgetsChanged -pause 250 -test LogHeap "30 widgets" -// -test SetMass 40 -test PluginWidgetsChanged -pause 250 -test LogHeap "40 widgets" -// -test SetMass 50 -test PluginWidgetsChanged -pause 250 -test LogHeap "50 widgets" -// -test SetMass 60 -test PluginWidgetsChanged -pause 250 -test LogHeap "60 widgets" -// -test SetMass 70 -test PluginWidgetsChanged -pause 250 -test LogHeap "70 widgets" -// -test SetMass 80 -test PluginWidgetsChanged -pause 250 -test LogHeap "80 widgets" -// -test SetMass 90 -test PluginWidgetsChanged -pause 250 -test LogHeap "90 widgets" -// -test SetMass 100 -test PluginWidgetsChanged -pause 250 -test LogHeap "100 widgets" -// -test SetMass 200 -test PluginWidgetsChanged -pause 250 -test LogHeap "200 widgets" -// -test SetMass 300 -test PluginWidgetsChanged -pause 250 -test LogHeap "300 widgets" -// -test SetMass 400 -test PluginWidgetsChanged -pause 250 -test LogHeap "400 widgets" -// -test SetMass 500 -test PluginWidgetsChanged -pause 250 -test LogHeap "500 widgets" -// -test PluginDeactivate -pause 250 -test LogHeap "wm deactive" -// -test PluginDeactivate -pause 500 -test PluginDelete -test HeapCheck -test LogHeap "after wm" -delete test -[Endtest] - -// Tests WmPlugin Activate method -[Test] -title WmPlugin activate/deactivate -create wmunittest test -test HeapSet -test PluginCreate -test SetMass 10 -test PluginActivate -pause 500 -test PluginDeactivate -pause 500 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -// Tests WmPlugin NotifyWidgetListChanged with no change at all -[Test] -title WmPlugin notify nochange -create wmunittest test -test HeapSet -test PluginCreate -test SetMass 10 -test PluginActivate -pause 500 -test SetMass 10 -test PluginWidgetsChanged -pause 500 -test PluginDeactivate -pause 500 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -// Tests WmPlugin NotifyWidgetListChanged 10->11 widgets -[Test] -title WmPlugin notify 10->11 -create wmunittest test -test HeapSet -test PluginCreate -test SetMass 10 -test PluginActivate -pause 500 -test SetMass 11 -test PluginWidgetsChanged -pause 500 -test PluginDeactivate -pause 500 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -// Tests WmPlugin NotifyWidgetListChanged 10->9 widgets -[Test] -title WmPlugin notify 10->9 -create wmunittest test -test HeapSet -test PluginCreate -test SetMass 10 -test PluginActivate -pause 500 -test SetMass 9 -test PluginWidgetsChanged -pause 500 -test PluginDeactivate -pause 500 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -// Tests WmPlugin NotifyWidgetListChanged 0->10 widgets -[Test] -title WmPlugin notify 0->10 -create wmunittest test -test HeapSet -test PluginCreate -test SetMass 0 -test PluginActivate -pause 500 -test SetMass 10 -test PluginWidgetsChanged -pause 500 -test PluginDeactivate -pause 500 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -// Tests WmPlugin NotifyWidgetListChanged 10->0 widgets -[Test] -title WmPlugin notify 10->0 -create wmunittest test -test HeapSet -test PluginCreate -test SetMass 10 -test PluginActivate -pause 500 -test SetMass 0 -test PluginWidgetsChanged -pause 500 -test PluginDeactivate -pause 500 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -// Tests WmPlugin NotifyWidgetListChanged with ridiculous amount of widgets -// testing the OOM error handling -[Test] -title WmPlugin notify OOM -create wmunittest test -test HeapSet -test PluginCreate -test SetMass 10 -test PluginActivate -pause 500 -test SetMass 10000 -test PluginWidgetsChanged -pause 500 -test PluginDeactivate -pause 500 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -// Tests WmPlugin with large data amount -[Test] -title WmPlugin capacity -create wmunittest test -test HeapSet -test PluginCreate -test SetMass MAX_WIDGET_AMOUNT -test PluginActivate -pause 3000 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -// Tests WmPlugin by notifying widget list changed hundreds of times -// with different widget amounts and different timeouts. Target is to -// interrupt the previous update process test that it is cancelled ok -[Test] -title WmPlugin robustness -create wmunittest test -test HeapSet -test PluginCreate -test SetMass 5 -test PluginActivate -pause 500 -loop 100 -test SetMass 10 -test PluginWidgetsChanged -pause 10 -test SetMass 15 -test PluginWidgetsChanged -pause 90 -test SetMass 11 -test PluginWidgetsChanged -pause 50 -test SetMass 16 -test PluginWidgetsChanged -pause 120 -endloop -test PluginDeactivate -pause 500 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -//------------------------------------------------------------------------------- -// Test cases for the persistent widget order -//------------------------------------------------------------------------------- -// - -// Tests persistent widget order NewL method -[Test] -title Widget order create -create wmunittest test -test HeapSet -test WidgetOrderCreate -test WidgetOrderCheckIsEmpty TRUE -test WidgetOrderDelete -test HeapCheck -delete test -[Endtest] - -// Test persistent widget order STORE method -[Test] -title Widget order store -create wmunittest test -test HeapSet -test WidgetOrderCreate -test WidgetOrderCheckIsEmpty TRUE -test SetMass 5 -test WidgetOrderSave -test WidgetOrderCheckIsEmpty FALSE -test WidgetOrderDelete -test HeapCheck -delete test -[Endtest] - -// Test persistent widget order STORE method when storing an empty array -[Test] -title Widget order store empty -create wmunittest test -test HeapSet -test WidgetOrderCreate -test WidgetOrderCheckIsEmpty TRUE -test SetMass 0 -test WidgetOrderSave -test WidgetOrderCheckIsEmpty TRUE -test WidgetOrderDelete -test HeapCheck -delete test -[Endtest] - - -// Tests persistent widget order LOAD method -[Test] -title Widget order load -create wmunittest test -test HeapSet -test WidgetOrderCreate -test SetMass 5 -test WidgetOrderSave -test WidgetOrderCheckIsEmpty 0 -test WidgetOrderDelete -test WidgetOrderCreate -test WidgetOrderLoad -test WidgetOrderCheckIsEmpty 0 -test WidgetOrderDelete -test HeapCheck -delete test -[Endtest] - -// Tests persistent widget order LOAD method when count is ZERO -[Test] -title Widget order load empty -create wmunittest test -test HeapSet -test WidgetOrderCreate -test SetMass 0 -test WidgetOrderSave -test WidgetOrderCheckIsEmpty TRUE -test WidgetOrderDelete -test WidgetOrderCreate -test WidgetOrderLoad -test WidgetOrderCheckIsEmpty TRUE -test WidgetOrderDelete -test HeapCheck -delete test -[Endtest] - -// Tests persistent widget order INDEXOF method -[Test] -title Widget order use -create wmunittest test -test HeapSet -test WidgetOrderCreate -test SetMass 8 -test WidgetOrderSave -test WidgetOrderCheckIsEmpty FALSE -test WidgetOrderUse -test WidgetOrderDelete -test HeapCheck -delete test -[Endtest] - -// Tests persistent widget order INDEXOF method when class is empty -[Test] -title Widget order use empty -create wmunittest test -test HeapSet -test WidgetOrderCreate -test WidgetOrderCheckIsEmpty TRUE -test SetMass 0 -test WidgetOrderUse -test WidgetOrderDelete -test HeapCheck -delete test -[Endtest] - -// Tests persistent widget order with large data amount -[Test] -title Widget order capacity -create wmunittest test -test HeapSet -test WidgetOrderCreate -test SetMass MAX_WIDGET_AMOUNT -test WidgetOrderSave -test WidgetOrderDelete -test WidgetOrderCreate -test WidgetOrderLoad -test SetMass MAX_WIDGET_AMOUNT -test WidgetOrderUse -test WidgetOrderDelete -test HeapCheck -delete test -[Endtest] - -// Tests persistent widget order save & load 100 times in sequence -[Test] -title Widget order robustness -create wmunittest test -test HeapSet -test WidgetOrderCreate -test SetMass 100 -loop 100 -test WidgetOrderSave -endloop -test WidgetOrderDelete -test WidgetOrderCreate -test SetMass 100 -loop 100 -test WidgetOrderLoad -endloop -test WidgetOrderUse -test WidgetOrderDelete -test HeapCheck -delete test -[Endtest] - - -//------------------------------------------------------------------------------- -// Test cases for the image converter -//------------------------------------------------------------------------------- -// - -// Tests image converter NewL method -[Test] -title Image converter create delete -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConversionMethod EUnrecognized -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests malformed icon string -[Test] -title malformed image formats -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "foo bar" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "*************" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "uid skin mif logo icon jpg jpeg icon" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "girl.jpg" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "dirty_hack.exe" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "c:/testframework/wmunittest/wmlogo/logo.jpg" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "skin (0x10005a26 0x1000 )" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "mif ( c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385)" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "skin( 0x100056c6 0x86 ):mif ( c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385 )" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "skin ( 0x101f84b7 0x1000594D ) : mif ( c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385 )" -test ImageConverterWaitResult FAIL -test ImageConverterConvert " uid(0x10005901 )" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "uid (268458241 )" -test ImageConverterWaitResult FAIL -test ImageConverterConvert "uid (0x10005901)" -test ImageConverterWaitResult FAIL -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - - -// Tests image converter with skin syntax -[Test] -title Image converter skin -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "skin(0x101F86E3 0x100d)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESkinIcon -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter skin method with null skin item ids -[Test] -title Image converter skin (null) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "skin(0 0)" -test ImageConverterWaitResult FAIL -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter with skin/mif syntax -[Test] -title Image converter skin/mif -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "skin(270501603 4145):mif(c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESkinAndMifIcon -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter mif method -[Test] -title Image converter mif -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 16384 16385)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EMifIcon -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter mif method with invalid path -[Test] -title Image converter mif (invalid path) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "mif(c:\blabla.mif 16384 16385)" -test ImageConverterWaitResult FAIL -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter mif method with invalid bitmap & mask ids -[Test] -title Image converter mif (invalid ids) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "mif(c:\testframework\wmunittest\wmlogo\logo.mif 1 2)" -test ImageConverterWaitResult FAIL -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter uid method -[Test] -title Image converter uid -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "uid(0x10005901)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EUidIcon -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter uid method with null uid -[Test] -title Image converter uid (null) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "uid(0x0)" -test ImageConverterWaitResult FAIL -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter uid method with wrt widget uid. -[Test] -title Image converter wrt widget -create wmunittest test -test HeapSet -test InstallWrtWidget "c:\testframework\wmunittest\wmlogo\test.wgz" -test ImageConverterCreate -test ImageConverterConvert "uid(0x2000DAD2)" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EUidIcon -test ImageConverterDelete -test UninstallWrtWidget "0x2000DAD2" -test HeapCheck -delete test -[Endtest] - -// Tests image converter svg method -[Test] -title Image converter svg -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.svg" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod ESvgIcon -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter svg method corrupt file. -[Test] -title Image converter svg (corrupted) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logocorrupt.svg" -test ImageConverterWaitResult FAIL -test ImageConverterConversionMethod ESvgIcon -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter png method -[Test] -title Image converter png -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.png" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EImageIcon -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter png method corrupt file. -[Test] -title Image converter png (corrupted) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logocorrupt.png" -test ImageConverterWaitResult FAIL -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter jpeg method -[Test] -title Image converter jpeg -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.jpg" -test ImageConverterWaitResult OK -test ImageConverterConversionMethod EImageIcon -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter jpeg method -[Test] -title Image converter jpeg (corrupted) -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logocorrupt.jpg" -test ImageConverterWaitResult FAIL -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - -// Tests image converter cancel -[Test] -title Image converter cancel -create wmunittest test -test HeapSet -test ImageConverterCreate -test ImageConverterConvert "c:\testframework\wmunittest\wmlogo\logo.svg" -test CancelConvert -test ImageConverterWaitResult FAIL -test ImageConverterDelete -test HeapCheck -delete test -[Endtest] - - -//------------------------------------------------------------------------------- -// Misc Test cases -//------------------------------------------------------------------------------- -// - -// Tests error note -[Test] -title Other error note -create wmunittest test -test HeapSet -test PluginCreate -test PluginActivate -test ErrorPopup -pause 3000 -test PluginDelete -test HeapCheck -delete test -[Endtest] - -/* -// Test for heikki to play :) -[Test] -title WmPlugin 1h test -create wmunittest test -test HeapSet -test PluginCreate -test SetMass 500 -test PluginActivate -pause 3600000 -test PluginDelete -test HeapCheck -delete test -[Endtest] -*/ - -