Button Upgrade to use Text Visual
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-ImageView.cpp
index 12c3f17..2ff700b 100644 (file)
@@ -384,7 +384,7 @@ int UtcDaliImageViewAsyncLoadingWithoutAltasing(void)
   END_TEST;
 }
 
-int UtcDaliImageViewAsyncLoadingWithAltasing(void)
+int UtcDaliImageViewAsyncLoadingWithAtlasing(void)
 {
   ToolkitTestApplication application;
 
@@ -393,13 +393,10 @@ int UtcDaliImageViewAsyncLoadingWithAltasing(void)
   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();
@@ -407,20 +404,8 @@ int UtcDaliImageViewAsyncLoadingWithAltasing(void)
   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);