+const char* TEST_IMAGE_FILE_NAME2 = "gallery_image_02.jpg";
+
+void TestImage( ImageView imageView, BufferImage image )
+{
+ Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
+
+ Property::Map map;
+ DALI_TEST_CHECK( value.Get( map ) );
+
+ DALI_TEST_CHECK( map.Find( "width" ) );
+ DALI_TEST_CHECK( map.Find( "height" ) );
+ DALI_TEST_CHECK( map.Find( "type" ) );
+
+ int width = 0;
+ DALI_TEST_CHECK( map[ "width" ].Get( width ) );
+ DALI_TEST_EQUALS( (unsigned int)width, image.GetWidth(), TEST_LOCATION );
+
+ int height = 0;
+ DALI_TEST_CHECK( map[ "height" ].Get( height ) );
+ DALI_TEST_EQUALS( (unsigned int)height, image.GetHeight(), TEST_LOCATION );
+
+ std::string type;
+ DALI_TEST_CHECK( map[ "type" ].Get( type ) );
+ DALI_TEST_EQUALS( type, "BufferImage", TEST_LOCATION );
+}
+
+void TestImage( ImageView imageView, ResourceImage image )
+{
+ Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
+
+ Property::Map map;
+ DALI_TEST_CHECK( value.Get( map ) );
+
+ if( map.Find( "width" ) )
+ {
+ int width = 0;
+ DALI_TEST_CHECK( map[ "width" ].Get( width ) );
+ DALI_TEST_EQUALS( (unsigned int)width, image.GetWidth(), TEST_LOCATION );
+ }
+
+ if( map.Find( "height" ) )
+ {
+ int height = 0;
+ DALI_TEST_CHECK( map[ "height" ].Get( height ) );
+ DALI_TEST_EQUALS( (unsigned int)height, image.GetHeight(), TEST_LOCATION );
+ }
+
+ DALI_TEST_CHECK( map.Find( "type" ) );
+
+ std::string type;
+ DALI_TEST_CHECK( map[ "type" ].Get( type ) );
+ DALI_TEST_EQUALS( type, "ResourceImage", TEST_LOCATION );
+
+ std::string filename;
+ DALI_TEST_CHECK( map[ "filename" ].Get( filename ) );
+ DALI_TEST_EQUALS( filename, image.GetUrl(), TEST_LOCATION );
+}
+
+void TestUrl( ImageView imageView, const std::string url )
+{
+ Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
+
+ std::string urlActual;
+ DALI_TEST_CHECK( value.Get( urlActual ) );
+ DALI_TEST_EQUALS( urlActual, url, TEST_LOCATION );
+}
+