- uint32_t id01 = loader.Load( gImage_34_RGBA, ImageDimensions( 34, 34 ) );
- uint32_t id02 = loader.Load( gImage_50_RGBA, ImageDimensions( 25, 25 ) );
-
- // cancel the loading of the first and second image
- loader.CancelAll();
-
- uint32_t id03 = loader.Load( gImage_128_RGB, ImageDimensions( 100, 100 ), FittingMode::SCALE_TO_FILL, SamplingMode::BOX_THEN_LINEAR, true );
-
- EventThreadCallback* eventTrigger = EventThreadCallback::Get();
- CallbackBase* callback = eventTrigger->GetCallback();
-
- eventTrigger->WaitingForTrigger( 1 );// waiting until the third images is loaded
-
- CallbackBase::Execute( *callback );
-
- application.SendNotification();
- application.Render();
-
- DALI_TEST_CHECK( loadedSignalVerifier.LoadedImageCount() == 1 );
+ // Test that it is safe to call CancelAll even there is no loading task requested.
+ try
+ {
+ loader.CancelAll();
+ }
+ catch(Dali::DaliException& e)
+ {
+ DALI_TEST_ASSERT(e, "AsyncImageLoader::LoadAll", TEST_LOCATION);
+ }