END_TEST;
}
-int UtcDaliImageViewAsyncLoadingWithAltasing(void)
+int UtcDaliImageViewAsyncLoadingWithAtlasing(void)
{
ToolkitTestApplication application;
callStack.Reset();
callStack.Enable(true);
- BitmapLoader::ResetLatestCreated();
ImageView imageView = ImageView::New( gImage_34_RGBA, ImageDimensions( 34, 34 ) );
// By default, Aysnc loading is used
// loading is not started if the actor is offStage
- BitmapLoader loader = BitmapLoader::GetLatestCreated();
- DALI_TEST_CHECK( !loader );
Stage::GetCurrent().Add( imageView );
application.SendNotification();
application.Render(16);
application.SendNotification();
- // loading started
- loader = BitmapLoader::GetLatestCreated();
- DALI_TEST_CHECK( loader );
-
- // worker thread is created
- EventThreadCallback* eventTrigger = EventThreadCallback::Get();
- DALI_TEST_CHECK( eventTrigger );
-
- loader.WaitForLoading();// waiting until the image to be loaded
- DALI_TEST_CHECK( loader.IsLoaded() );
-
- eventTrigger->WaitingForTrigger( 1 );
- CallbackBase* callback = eventTrigger->GetCallback();
- CallbackBase::Execute( *callback );
+ // loading started, this waits for the loader thread for max 30 seconds
+ DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
application.SendNotification();
application.Render(16);