Revert "[3.0] Clipping API feature in Actor"
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Layer.cpp
index 97f58a1..34c5741 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -262,8 +262,8 @@ int UtcDaliLayerSetSortFunction(void)
   TestApplication application;
   BufferImage img = BufferImage::New( 1,1 );
   // create two transparent actors so there is something to sort
-  ImageActor actor = ImageActor::New( img );
-  ImageActor actor2 = ImageActor::New( img );
+  Actor actor = CreateRenderableActor( img );
+  Actor actor2 = CreateRenderableActor( img );
   actor.SetSize(1,1);
   actor.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
   actor2.SetSize(1,1);
@@ -477,7 +477,7 @@ int UtcDaliLayerDefaultProperties(void)
 
 
   Property::Value behavior = actor.GetProperty(Layer::Property::BEHAVIOR);
-  DALI_TEST_CHECK( std::strcmp( behavior.Get<std::string>().c_str(), "LAYER_2D") );
+  DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_2D", TEST_LOCATION );
 
   END_TEST;
 }
@@ -488,13 +488,17 @@ int UtcDaliLayerSetDepthTestDisabled(void)
   tet_infoline("Testing Dali::Layer::SetDepthTestDisabled() ");
 
   Layer actor = Layer::New();
+  // Note that IsDepthTestDisabled does not depend on layer behavior,
+  // as 2D layers can still have depth tests performed on a per-renderer basis.
+  // Check default.
   DALI_TEST_CHECK( actor.IsDepthTestDisabled() );
 
-  actor.SetBehavior( Layer::LAYER_3D );
+  // Check Set / Unset.
+  actor.SetDepthTestDisabled( false );
   DALI_TEST_CHECK( !actor.IsDepthTestDisabled() );
-
   actor.SetDepthTestDisabled( true );
   DALI_TEST_CHECK( actor.IsDepthTestDisabled() );
+
   END_TEST;
 }
 
@@ -555,7 +559,7 @@ int UtcDaliLayerClippingGLCalls(void)
 
   // Add at least one renderable actor so the GL calls are actually made
   BufferImage img = BufferImage::New( 1,1 );
-  Actor actor = ImageActor::New( img );
+  Actor actor = CreateRenderableActor( img );
   stage.Add( actor );
 
   // flush the queue and render once