/** @SYMTestCaseID UIF-CONE-0015 @SYMTestCaseDesc Check use of CCoeEnv::LeaveWithErrorText() to display a dialog with error text of 'Test Error Message' @SYMTestPriority Critical @SYMTestType Component Integration Test @SYMTestStatus Implemented @SYMTestActions Start the TErrMsgApp, which takes the TailEnd set to "TestCase08", that then sets up the Error Text before calling CCoeEnv::LeaveWithErrorText() to result in the display of the dialog. @SYMTestExpectedResults Dialog with 'Test Error Message' displayed. NOTE: No Context error message @SYMTestCaseDependencies TErrMsgApp.exe (see TErrMsgApp.cpp) */ void CConeErrorMsgTestAppUi::TestCase08() { INFO_PRINTF1(_L("UIF-CONE-0015 - test case start")); INFO_PRINTF1(_L("ErrMsg Dialog")); _LIT8(KTestCaseName, "UIF-CONE-0015 ErrMsg"); _LIT(KDbgBmp, "c:\\test\\appfwk\\cone\\errmsg.bmp"); _LIT(KDbgConvBmp, "c:\\test\\appfwk\\cone\\errmsg_conv_act.bmp"); _LIT(KDbgConvCompBmp, "c:\\test\\appfwk\\cone\\errmsg_conv_exp.bmp"); _LIT(KDbgMbm, "c:\\test\\appfwk\\cone\\errmsg.mbm"); _LIT(KTestCompareMbm, "z:\\conetest\\errmsg.mbm"); _LIT(KTestCompareMbmh6, "z:\\conetest\\errmsgh6.mbm"); _LIT(KTestCompareMbmh6vga, "z:\\conetest\\errmsgh6vga.mbm"); _LIT(KTestCompareMbmNavi, "z:\\conetest\\errmsgnavi.mbm"); TSize screenSize = CalculateScreenSize(); TInt err; //test on h4 or emulator if((screenSize.iHeight == 240 && screenSize.iWidth == 320) || (screenSize.iHeight == 240 && screenSize.iWidth ==640)) { TRAP(err,TestErrorDialogL( KTestCaseName, KTestCompareMbm, &KDbgBmp, &KDbgConvBmp, &KDbgConvCompBmp, &KDbgMbm)); } //test on h6 QVGA else if(screenSize.iHeight == 320 && screenSize.iWidth == 240) { TRAP(err,TestErrorDialogL( KTestCaseName, KTestCompareMbmh6, &KDbgBmp, &KDbgConvBmp, &KDbgConvCompBmp, &KDbgMbm)); } //test on h6 VGA else if(screenSize.iHeight == 640 && screenSize.iWidth == 480) { TRAP(err,TestErrorDialogL( KTestCaseName, KTestCompareMbmh6vga, &KDbgBmp, &KDbgConvBmp, &KDbgConvCompBmp, &KDbgMbm)); } //test on NaviEngine else if(screenSize.iHeight == 480 && screenSize.iWidth == 640) { TRAP(err,TestErrorDialogL( KTestCaseName, KTestCompareMbmNavi, &KDbgBmp, &KDbgConvBmp, &KDbgConvCompBmp, &KDbgMbm)); } //It might be a new platform or unknown hardware else { err = KErrNotFound; ERR_PRINTF1(_L("UIF-CONE-0015 - Test case ERROR - Unknown Screen size")); } TEST(err==KErrNone); INFO_PRINTF1(_L("UIF-CONE-0015 - test case end")); }
//-------------------------------------------------------------------------------------- // Entry point to the program. Initializes everything and goes into a message processing // loop. Idle time is used to render the scene. //-------------------------------------------------------------------------------------- int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow ) { UNREFERENCED_PARAMETER( hPrevInstance ); UNREFERENCED_PARAMETER( lpCmdLine ); g_options.bpp = 32; g_options.dWidth = 1280; g_options.dHeight = 1280/16*9; g_options.iWidth = 1280/4*2; g_options.iHeight = 720/4*2; g_options.offsetX = 0; g_options.offsetY = 0; g_options.sWidth = 0; g_options.sHeight = 0; g_options.aspectRatio = 4/3; #ifdef SYNC_PLAYER g_options.fullscreen = true; #else g_options.fullscreen = false; #endif g_options.saveImages = false; g_options.saveFrameRate = 60.0; if( FAILED( InitWindow( hInstance, nCmdShow ) ) ) { Quit("Failed to initialize window"); } #ifdef SYNC_PLAYER InitOptions(); #endif CalculateScreenSize(); SetWindowPos(g_hWnd, NULL, 0, 0, g_options.dWidth, g_options.dHeight, NULL); ShowWindow( g_hWnd, nCmdShow ); if( FAILED( InitDevice() ) ) { Quit("Failed to initialize device"); } BOOL *fullscreen = new BOOL; g_pSwapChain->GetFullscreenState(fullscreen,NULL); while(*fullscreen != g_options.fullscreen) { g_pSwapChain->GetFullscreenState(fullscreen,NULL); Sleep(1000); } #ifdef SYNC_PLAYER ShowCursor(FALSE); #endif InitAudio(); LoadShaders(); DemoInit(); PlayMusic(); // Main message loop MSG msg = {0}; #ifndef SYNC_PLAYER double lastRow = -1; #endif while( true) { if(WM_QUIT == msg.message) break; #ifdef SYNC_PLAYER if(GetAsyncKeyState(VK_ESCAPE)) break; #endif if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) ) { TranslateMessage( &msg ); DispatchMessage( &msg ); } else { double row = GetAudioRow(); double delta = row - lastRow; if(row > 3504) break; #ifndef SYNC_PLAYER if(row == lastRow) { // Turha syödä kaikki resursseja, jos pause päällä. Sleep(100); } #endif lastRow = row; Render(row, delta); } } CleanupDevice(); return ( int )msg.wParam; }