+ Property::Map propertyMap;
+ propertyMap.Insert( "rendererType", "image" );
+ propertyMap.Insert( "url", TEST_NPATCH_FILE_NAME );
+ {
+ ControlRenderer controlRenderer = factory.GetControlRenderer( propertyMap );
+ DALI_TEST_CHECK( controlRenderer );
+
+ Actor actor = Actor::New();
+ TestGlAbstraction& gl = application.GetGlAbstraction();
+ TraceCallStack& textureTrace = gl.GetTextureTrace();
+ textureTrace.Enable(true);
+
+ TestControlRendererRender( application, actor, controlRenderer, 1u,
+ ImageDimensions(ninePatchImageWidth, ninePatchImageHeight),
+ ninePatchResource );
+
+
+ DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
+
+ controlRenderer.SetOffStage( actor );
+ DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
+ }
+
+ propertyMap.Insert( "borderOnly", true );
+ {
+ tet_infoline( "border only" );
+ ControlRenderer controlRenderer = factory.GetControlRenderer( propertyMap );
+ DALI_TEST_CHECK( controlRenderer );
+
+ TestGlAbstraction& gl = application.GetGlAbstraction();
+ TraceCallStack& textureTrace = gl.GetTextureTrace();
+ textureTrace.Enable(true);
+ Actor actor = Actor::New();
+ TestControlRendererRender( application, actor, controlRenderer, 1u,
+ ImageDimensions(ninePatchImageWidth, ninePatchImageHeight),
+ ninePatchResource );
+
+
+ DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
+
+ controlRenderer.SetOffStage( actor );
+ DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
+ }