From: jungmin76.park Date: Mon, 15 Jul 2013 12:36:53 +0000 (+0900) Subject: fix unittest fails. X-Git-Tag: accepted/tizen/20130912.081830~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a960d35dff29d28a9c0bbfeca8e8ba864b3d07c4;p=platform%2Fframework%2Fnative%2Fappwidget-service.git fix unittest fails. Change-Id: I7fc22bad53eec1fcb17ea3a34836c39bc83f9800 Signed-off-by: jungmin76.park --- diff --git a/src/FShell_AppWidgetContext.cpp b/src/FShell_AppWidgetContext.cpp index 4fd06d1..f8d58ba 100644 --- a/src/FShell_AppWidgetContext.cpp +++ b/src/FShell_AppWidgetContext.cpp @@ -288,7 +288,7 @@ result _AppWidgetContext::RequestUpdate(const String& argument) { AppWidgetManagerService* pMgrService = AppWidgetManagerService::GetInstance(); - SysTryReturnResult(NID_SHELL, pMgrService, E_SYSTEM, "[E_SYSTEM] Failed to get an instance of AppWidgetManagerService."); + SysTryReturnResult(NID_SHELL, pMgrService, E_SYSTEM, "Failed to get an instance of AppWidgetManagerService."); result r = pMgrService->RequestUpdate(this, argument); SysTryReturnResult(NID_SHELL, !IsFailed(r), r, "Failed to request update."); @@ -403,22 +403,17 @@ _AppWidgetContext::SendRemoveRequest(void) result _AppWidgetContext::SendPendingEvent(void) { - TryReturnResult(__pPendingEventList->GetCount() > 0 , "There is no pending event."); + GetAppContext()->SetWaitingStatus(false); + TryReturn(__pPendingEventList->GetCount() > 0, E_DATA_NOT_FOUND, "This context has no pending event. Please find next pending event context."); PendingEvent* pEvent = null; __pPendingEventList->GetAt(0, pEvent); - - if (pEvent == null) - { - SysLog(NID_SHELL, "SendPendingEvent by IPC [0 existed.]"); - GetAppContext()->SetWaitingStatus(false); - return E_SYSTEM; - } - SysLog(NID_SHELL, "SendPendingEvent by IPC [%d existed.]", __pPendingEventList->GetCount()); + SysTryReturnResult(NID_SHELL, pEvent != null, E_SYSTEM, "__pPendingEventList has (%d) items, but failed to GetAt(0)", __pPendingEventList->GetCount()); __pPendingEventList->RemoveAt(0); + SysLog(NID_SHELL, "(%d) Remains in __pPendingEventList.", __pPendingEventList->GetCount()); + result r = _AppWidgetRequestHelper::SendIpcRequest(GetClientId(), pEvent->operation, pEvent->pArg); - GetAppContext()->SetWaitingStatus(false); delete pEvent; SysTryReturnResult(NID_SHELL, !IsFailed(r), E_SYSTEM, "SendIpcRequest failed.");