+// Different requests, incompatible resource, so two loads result:
+int UtcDaliImageFactoryInCompatibleResource(void)
+{
+ TestApplication application;
+ tet_infoline( "UtcDaliImageFactoryCompatibleResource02 - Two requests mapping to same resource." );
+
+ ImageFactory& imageFactory = Internal::ThreadLocalStorage::Get().GetImageFactory();
+
+ Vector2 testSize(2048.0f, 2048.0f);
+ application.GetPlatform().SetClosestImageSize(testSize);
+
+ // request with default attributes ( size is 0,0 )
+ RequestPtr req = imageFactory.RegisterRequest( gTestImageFilename, NULL );
+ ResourceTicketPtr ticket = imageFactory.Load( *req.Get() );
+
+ application.SendNotification();
+ application.Render();
+ application.SendNotification();
+ application.Render();
+
+ // emulate load success
+ EmulateImageLoaded( application, testSize.x, testSize.y );
+
+ // Request substantially different size than actual image.
+ // This will issue a second resource load as difference in sizes is greater than
+ // the small fudge factor used in the ImageFactory cache.
+ ImageAttributes attr = ImageAttributes::New();
+ attr.SetSize( testSize.x - 16, testSize.y - 16 );
+ RequestPtr req2 = imageFactory.RegisterRequest( gTestImageFilename, &attr );
+ ResourceTicketPtr ticket2 = imageFactory.Load( *req2.Get() );
+
+ DALI_TEST_CHECK( req != req2 ); // different requests
+ DALI_TEST_CHECK( ticket->GetId() != ticket2->GetId() ); // differnet resources
+ END_TEST;
+}
+