X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-VisualFactory.cpp;h=b8e40b86d0147e8a7d01b7882c1786ab2880d27a;hp=ab0f0cd0165ac08e38f124bf6d11e1a5c57a8fe5;hb=9c1520c7e421a8866e8d7481a2a2965e5b26c89e;hpb=cb30ef68af0383b073ba2d425d3d95c1e916cbb4 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp b/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp index ab0f0cd..b8e40b8 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include "dummy-control.h" @@ -37,8 +38,7 @@ namespace { typedef NinePatchImage::StretchRanges StretchRanges; -const char* TEST_IMAGE_FILE_NAME = "gallery_image_01.jpg"; -const char* TEST_NPATCH_FILE_NAME = "gallery_image_01.9.png"; +const char* TEST_NPATCH_FILE_NAME = TEST_RESOURCE_DIR "/button-up-1.9.png"; const char* TEST_SVG_FILE_NAME = TEST_RESOURCE_DIR "/svg1.svg"; const char* TEST_OBJ_FILE_NAME = TEST_RESOURCE_DIR "/Cube.obj"; const char* TEST_MTL_FILE_NAME = TEST_RESOURCE_DIR "/ToyRobot-Metal.mtl"; @@ -50,8 +50,7 @@ const char* TEST_GIF_FILE_NAME = TEST_RESOURCE_DIR "/anim.gif"; // resolution: 34*34, pixel format: RGBA8888 static const char* gImage_34_RGBA = TEST_RESOURCE_DIR "/icon-edit.png"; -// resolution: 600*600, pixel format: RGB888 -static const char* gImage_600_RGB = TEST_RESOURCE_DIR "/test-image-600.jpg"; + Property::Map DefaultTransform() { @@ -61,7 +60,8 @@ Property::Map DefaultTransform() .Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) ) .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER ) .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4::ZERO ); + .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) ) + .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) ); return transformMap; } @@ -223,22 +223,12 @@ void TestVisualRender( ToolkitTestApplication& application, application.SendNotification(); application.Render(); - if( resourcePtr ) - { - Integration::ResourceRequest* request = application.GetPlatform().GetRequest(); - if(request) - { - application.GetPlatform().SetResourceLoaded(request->GetId(), request->GetType()->id, resourcePtr ); - } - } - application.Render(); application.SendNotification(); if( resourcePtr ) { - DALI_TEST_EQUALS( application.GetPlatform().WasCalled(TestPlatformAbstraction::LoadResourceFunc) || - application.GetPlatform().WasCalled(TestPlatformAbstraction::LoadResourceSynchronouslyFunc ), true, TEST_LOCATION); + DALI_TEST_EQUALS( application.GetPlatform().WasCalled(TestPlatformAbstraction::LoadResourceSynchronouslyFunc ), true, TEST_LOCATION); } DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION ); @@ -600,283 +590,117 @@ int UtcDaliVisualFactoryDefaultOffsetsGradientVisual(void) END_TEST; } -int UtcDaliVisualFactoryGetImageVisual1(void) -{ - ToolkitTestApplication application; - tet_infoline( "UtcDaliVisualFactoryGetImageVisual1: Request image visual with a Property::Map" ); - VisualFactory factory = VisualFactory::Get(); - DALI_TEST_CHECK( factory ); - Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); - propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME ); - - Visual::Base visual = factory.CreateVisual( propertyMap ); - DALI_TEST_CHECK( visual ); - // For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied. - // Image with a size smaller than 512*512 will be uploaded as a part of the atlas. - const int width=512; - const int height=513; - TestGlAbstraction& gl = application.GetGlAbstraction(); - TraceCallStack& textureTrace = gl.GetTextureTrace(); - textureTrace.Enable(true); - - Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD ); - bitmap->GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, width, height,width, height ); - - DummyControl actor = DummyControl::New(); - TestVisualRender( application, actor, visual, 1u, - ImageDimensions(width, height), - Integration::ResourcePointer( bitmap ) ); - - DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION ); - - Stage::GetCurrent().Remove( actor ); - DALI_TEST_CHECK( actor.GetRendererCount() == 0u ); - - END_TEST; -} - -int UtcDaliVisualFactoryGetImageVisual2(void) -{ - ToolkitTestApplication application; - tet_infoline( "UtcDaliVisualFactoryGetImageVisual2: Request image visual with an image handle" ); - - VisualFactory factory = VisualFactory::Get(); - DALI_TEST_CHECK( factory ); - - Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME); - Visual::Base visual = factory.CreateVisual( image ); - - // For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied. - // Image with a size smaller than 512*512 will be uploaded as a part of the atlas. - - const int width=512; - const int height=513; - - Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD ); - bitmap->GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, width, height,width, height ); - - TestGlAbstraction& gl = application.GetGlAbstraction(); - TraceCallStack& textureTrace = gl.GetTextureTrace(); - textureTrace.Enable(true); - - DummyControl actor = DummyControl::New(); - TestVisualRender( application, actor, visual, 1u, - ImageDimensions(width, height), - Integration::ResourcePointer(bitmap) ); - - DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliVisualFactoryGetImageVisual3(void) +int UtcDaliVisualFactoryGetNPatchVisual1(void) { ToolkitTestApplication application; - tet_infoline( "UtcDaliVisualFactoryGetImageVisual3: Request image visual with a Property::Map, test custom wrap mode and pixel area with atlasing" ); + tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual1: Request 9-patch visual with a Property::Map" ); VisualFactory factory = VisualFactory::Get(); DALI_TEST_CHECK( factory ); - // Test wrap mode with atlasing. Image with a size smaller than 512*512 will be uploaded as a part of the atlas. - const int width=34; - const int height=34; - const Vector4 pixelArea(-0.5f, -0.5f, 2.f, 2.f); + const unsigned int ninePatchImageHeight = 18; + const unsigned int ninePatchImageWidth = 28; + StretchRanges stretchRangesX; + stretchRangesX.PushBack( Uint16Pair( 2, 3 ) ); + StretchRanges stretchRangesY; + stretchRangesY.PushBack( Uint16Pair( 4, 5 ) ); + Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); - propertyMap.Insert( ImageVisual::Property::URL, gImage_34_RGBA ); - propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, width ); - propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, height ); - propertyMap.Insert( ImageVisual::Property::SYNCHRONOUS_LOADING, true ); - propertyMap.Insert( ImageVisual::Property::PIXEL_AREA, pixelArea ); - propertyMap.Insert( ImageVisual::Property::WRAP_MODE_U, WrapMode::MIRRORED_REPEAT ); - propertyMap.Insert( ImageVisual::Property::WRAP_MODE_V, WrapMode::REPEAT ); - - Visual::Base visual = factory.CreateVisual( propertyMap ); - DALI_TEST_CHECK( visual ); - - TestGlAbstraction& gl = application.GetGlAbstraction(); - TraceCallStack& textureTrace = gl.GetTextureTrace(); - textureTrace.Enable(true); - TraceCallStack& texParameterTrace = gl.GetTexParameterTrace(); - texParameterTrace.Enable( true ); - - DummyControl actor = DummyControl::New(); - DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); - dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize(2000, 2000); - actor.SetParentOrigin(ParentOrigin::CENTER); - Stage::GetCurrent().Add( actor ); + propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME ); + { + tet_infoline( "whole grid" ); + Visual::Base visual = factory.CreateVisual( propertyMap ); + DALI_TEST_CHECK( visual ); - // loading started - application.SendNotification(); - application.Render(); - application.Render(); - application.SendNotification(); - BitmapLoader loader = BitmapLoader::GetLatestCreated(); - DALI_TEST_CHECK( loader ); - loader.WaitForLoading();// waiting until the image to be loaded - DALI_TEST_CHECK( loader.IsLoaded() ); - DALI_TEST_CHECK( actor.GetRendererCount() == 1u ); + TestGlAbstraction& gl = application.GetGlAbstraction(); + TraceCallStack& textureTrace = gl.GetTextureTrace(); + textureTrace.Enable(true); - DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION ); + DummyControl actor = DummyControl::New(); + TestVisualRender( application, actor, visual, 1u, + ImageDimensions(ninePatchImageWidth, ninePatchImageHeight), + ninePatchResource ); - // WITH atlasing, the wrapping is handled manually in shader, so the following gl function should not be called - std::stringstream out; - out << GL_TEXTURE_2D << ", " << GL_TEXTURE_WRAP_S << ", " << GL_MIRRORED_REPEAT; - DALI_TEST_CHECK( !texParameterTrace.FindMethodAndParams("TexParameteri", out.str()) ); - out.str(""); - out << GL_TEXTURE_2D << ", " << GL_TEXTURE_WRAP_T << ", " << GL_REPEAT; - DALI_TEST_CHECK( !texParameterTrace.FindMethodAndParams("TexParameteri", out.str()) ); + DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION ); + } - // test the uniforms which used to handle the wrap mode - Renderer renderer = actor.GetRendererAt( 0u ); - DALI_TEST_CHECK( renderer ); + propertyMap.Insert( ImageVisual::Property::BORDER_ONLY, true ); + { + tet_infoline( "border only" ); + Visual::Base visual = factory.CreateVisual( propertyMap ); + DALI_TEST_CHECK( visual ); - Property::Value pixelAreaValue = renderer.GetProperty( renderer.GetPropertyIndex( "pixelArea" ) ); - DALI_TEST_EQUALS( pixelAreaValue.Get(), pixelArea, TEST_LOCATION ); - Vector4 pixelAreaUniform; - DALI_TEST_CHECK( gl.GetUniformValue( "pixelArea", pixelAreaUniform ) ); - DALI_TEST_EQUALS( pixelArea, pixelAreaUniform, Math::MACHINE_EPSILON_100, TEST_LOCATION ); + TestGlAbstraction& gl = application.GetGlAbstraction(); + TraceCallStack& textureTrace = gl.GetTextureTrace(); + textureTrace.Enable(true); - Property::Value wrapModeValue = renderer.GetProperty( renderer.GetPropertyIndex( "wrapMode" ) ); - Vector2 wrapMode( WrapMode::MIRRORED_REPEAT-1, WrapMode::REPEAT-1 ); - DALI_TEST_EQUALS( wrapModeValue.Get(), wrapMode, TEST_LOCATION ); - Vector2 wrapModeUniform; - DALI_TEST_CHECK( gl.GetUniformValue( "wrapMode", wrapModeUniform ) ); - DALI_TEST_EQUALS( wrapMode, wrapModeUniform, Math::MACHINE_EPSILON_100, TEST_LOCATION ); + DummyControl actor = DummyControl::New(); + TestVisualRender( application, actor, visual, 1u, + ImageDimensions(ninePatchImageWidth, ninePatchImageHeight), + ninePatchResource ); - actor.Unparent( ); - DALI_TEST_CHECK( actor.GetRendererCount() == 0u ); + DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION ); + } END_TEST; } -int UtcDaliVisualFactoryGetImageVisual4(void) +int UtcDaliVisualFactoryGetNPatchVisual2(void) { ToolkitTestApplication application; - tet_infoline( "UtcDaliVisualFactoryGetImageVisual4: Request image visual with a Property::Map, test custom wrap mode and pixel area without atlasing" ); + tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual1: Request 9-patch visual with a Property::Map including border" ); VisualFactory factory = VisualFactory::Get(); DALI_TEST_CHECK( factory ); - // Test wrap mode without atlasing. Image with a size bigger than 512*512 will NOT be uploaded as a part of the atlas. - const int width=600; - const int height=600; - const Vector4 pixelArea(-0.5f, -0.5f, 2.f, 2.f); - Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); - propertyMap.Insert( ImageVisual::Property::URL, gImage_600_RGB ); - propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, width ); - propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, height ); - propertyMap.Insert( ImageVisual::Property::SYNCHRONOUS_LOADING, true ); - propertyMap.Insert( ImageVisual::Property::PIXEL_AREA, pixelArea ); - propertyMap.Insert( ImageVisual::Property::WRAP_MODE_U, WrapMode::MIRRORED_REPEAT ); - propertyMap.Insert( ImageVisual::Property::WRAP_MODE_V, WrapMode::REPEAT ); - - Visual::Base visual = factory.CreateVisual( propertyMap ); - DALI_TEST_CHECK( visual ); - - TestGlAbstraction& gl = application.GetGlAbstraction(); - TraceCallStack& textureTrace = gl.GetTextureTrace(); - textureTrace.Enable(true); - TraceCallStack& texParameterTrace = gl.GetTexParameterTrace(); - texParameterTrace.Enable( true ); - - DummyControl actor = DummyControl::New(); - DummyControlImpl& dummyImpl = static_cast(actor.GetImplementation()); - dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual ); - actor.SetSize(2000, 2000); - actor.SetParentOrigin(ParentOrigin::CENTER); - Stage::GetCurrent().Add( actor ); - - // loading started - application.SendNotification(); - application.Render(); - application.Render(); - application.SendNotification(); - BitmapLoader loader = BitmapLoader::GetLatestCreated(); - DALI_TEST_CHECK( loader ); - loader.WaitForLoading();// waiting until the image to be loaded - DALI_TEST_CHECK( loader.IsLoaded() ); - - DALI_TEST_CHECK( actor.GetRendererCount() == 1u ); - - DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION ); - - // WITHOUT atlasing, the wrapping is handled by setting gl texture parameters - std::stringstream out; - out << GL_TEXTURE_2D << ", " << GL_TEXTURE_WRAP_S << ", " << GL_MIRRORED_REPEAT; - DALI_TEST_CHECK( texParameterTrace.FindMethodAndParams("TexParameteri", out.str()) ); - out.str(""); - out << GL_TEXTURE_2D << ", " << GL_TEXTURE_WRAP_T << ", " << GL_REPEAT; - DALI_TEST_CHECK( texParameterTrace.FindMethodAndParams("TexParameteri", out.str()) ); - - // test the uniforms which used to handle the wrap mode - Renderer renderer = actor.GetRendererAt( 0u ); - DALI_TEST_CHECK( renderer ); - - Property::Value pixelAreaValue = renderer.GetProperty( renderer.GetPropertyIndex( "pixelArea" ) ); - DALI_TEST_EQUALS( pixelAreaValue.Get(), pixelArea, TEST_LOCATION ); - Vector4 pixelAreaUniform; - DALI_TEST_CHECK( gl.GetUniformValue( "pixelArea", pixelAreaUniform ) ); - DALI_TEST_EQUALS( pixelArea, pixelAreaUniform, Math::MACHINE_EPSILON_100, TEST_LOCATION ); - - Property::Index wrapModeIndex = renderer.GetPropertyIndex( "wrapMode" ); - DALI_TEST_CHECK(wrapModeIndex == Property::INVALID_INDEX); - - actor.Unparent(); - DALI_TEST_CHECK( actor.GetRendererCount() == 0u ); - - END_TEST; -} + propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap.Insert( ImageVisual::Property::URL, gImage_34_RGBA ); + propertyMap.Insert( DevelImageVisual::Property::BORDER, Rect< int >( 2, 2, 2, 2 ) ); + { + tet_infoline( "whole grid" ); + Visual::Base visual = factory.CreateVisual( propertyMap ); + DALI_TEST_CHECK( visual ); -int UtcDaliVisualFactoryGetNPatchVisual1(void) -{ - ToolkitTestApplication application; - tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual1: Request 9-patch visual with a Property::Map" ); + TestGlAbstraction& gl = application.GetGlAbstraction(); + TraceCallStack& textureTrace = gl.GetTextureTrace(); + textureTrace.Enable(true); - VisualFactory factory = VisualFactory::Get(); - DALI_TEST_CHECK( factory ); + DummyControl actor = DummyControl::New(); + TestVisualRender( application, actor, visual, 1u ); - const unsigned int ninePatchImageHeight = 18; - const unsigned int ninePatchImageWidth = 28; - StretchRanges stretchRangesX; - stretchRangesX.PushBack( Uint16Pair( 2, 3 ) ); - StretchRanges stretchRangesY; - stretchRangesY.PushBack( Uint16Pair( 4, 5 ) ); - Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY ); + DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION ); + } - Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); - propertyMap.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME ); + propertyMap.Insert( ImageVisual::Property::BORDER_ONLY, true ); { - tet_infoline( "whole grid" ); + tet_infoline( "border only" ); Visual::Base visual = factory.CreateVisual( propertyMap ); DALI_TEST_CHECK( visual ); - TestGlAbstraction& gl = application.GetGlAbstraction(); TraceCallStack& textureTrace = gl.GetTextureTrace(); textureTrace.Enable(true); DummyControl actor = DummyControl::New(); - TestVisualRender( application, actor, visual, 1u, - ImageDimensions(ninePatchImageWidth, ninePatchImageHeight), - ninePatchResource ); + TestVisualRender( application, actor, visual, 1u ); DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION ); } - propertyMap.Insert( ImageVisual::Property::BORDER_ONLY, true ); + propertyMap.Clear(); + propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap.Insert( ImageVisual::Property::URL, gImage_34_RGBA ); + propertyMap.Insert( DevelImageVisual::Property::BORDER, Rect< int >( 1, 1, 1, 1 ) ); { - tet_infoline( "border only" ); + tet_infoline( "whole grid" ); Visual::Base visual = factory.CreateVisual( propertyMap ); DALI_TEST_CHECK( visual ); @@ -885,9 +709,7 @@ int UtcDaliVisualFactoryGetNPatchVisual1(void) textureTrace.Enable(true); DummyControl actor = DummyControl::New(); - TestVisualRender( application, actor, visual, 1u, - ImageDimensions(ninePatchImageWidth, ninePatchImageHeight), - ninePatchResource ); + TestVisualRender( application, actor, visual, 1u ); DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION ); } @@ -895,7 +717,7 @@ int UtcDaliVisualFactoryGetNPatchVisual1(void) END_TEST; } -int UtcDaliVisualFactoryGetNPatchVisual2(void) +int UtcDaliVisualFactoryGetNPatchVisual3(void) { ToolkitTestApplication application; tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual2: Request n-patch visual with a Property::Map" ); @@ -917,7 +739,7 @@ int UtcDaliVisualFactoryGetNPatchVisual2(void) Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); propertyMap.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME ); { Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -962,7 +784,7 @@ int UtcDaliVisualFactoryGetNPatchVisual2(void) END_TEST; } -int UtcDaliVisualFactoryGetNPatchVisual3(void) +int UtcDaliVisualFactoryGetNPatchVisual4(void) { ToolkitTestApplication application; tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual3: Request 9-patch visual with an image url" ); @@ -1003,7 +825,7 @@ int UtcDaliVisualFactoryGetNPatchVisual3(void) END_TEST; } -int UtcDaliVisualFactoryGetNPatchVisual4(void) +int UtcDaliVisualFactoryGetNPatchVisual5(void) { ToolkitTestApplication application; tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual4: Request n-patch visual with an image url" ); @@ -1083,7 +905,7 @@ int UtcDaliVisualFactoryGetNPatchVisualN2(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); propertyMap.Insert( ImageVisual::Property::URL, "ERROR.9.jpg" ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -1234,10 +1056,6 @@ void MeshVisualLoadsCorrectlyTest( Property::Map& propertyMap, ToolkitTestApplic application.SendNotification(); application.Render( 0 ); - //Tell the platform abstraction that the required resources have been loaded. - TestPlatformAbstraction& platform = application.GetPlatform(); - platform.SetAllResourceRequestsAsLoaded(); - //Render again to upload the now-loaded textures. application.SendNotification(); application.Render( 0 ); @@ -1281,10 +1099,6 @@ void MeshVisualDoesNotLoadCorrectlyTest( Property::Map& propertyMap, ToolkitTest application.SendNotification(); application.Render( 0 ); - //Tell the platform abstraction that the required resources have been loaded. - TestPlatformAbstraction& platform = application.GetPlatform(); - platform.SetAllResourceRequestsAsLoaded(); - //Render again to upload the now-loaded textures. application.SendNotification(); application.Render( 0 );