Removed ImageActor usage from automated-tests 61/66561/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 19 Apr 2016 11:32:11 +0000 (12:32 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 19 Apr 2016 11:32:11 +0000 (12:32 +0100)
Change-Id: Ia298a3d5dfe3449606151da70df139c42f864323

automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h
automated-tests/src/dali-toolkit/utc-Dali-Builder.cpp
automated-tests/src/dali-toolkit/utc-Dali-DefaultControls.cpp [deleted file]
automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp
automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp
automated-tests/src/dali-toolkit/utc-Dali-KeyInputFocusManager.cpp

index 8bf9857..1159faa 100644 (file)
@@ -35,7 +35,6 @@ SET(TC_SOURCES
    utc-Dali-Button.cpp
    utc-Dali-Control.cpp
    utc-Dali-ControlImpl.cpp
-   utc-Dali-DefaultControls.cpp
    utc-Dali-AccessibilityManager.cpp
    utc-Dali-ItemLayout.cpp
    utc-Dali-ItemView.cpp
index 3c83f7e..40280a0 100644 (file)
@@ -68,13 +68,4 @@ private:
 
 } // namespace Dali
 
-inline ImageActor CreateSolidColorImageActor(ToolkitTestApplication& application, const Vector4& color, int width, int height)
-{
-  ImageActor actor = ImageActor::New(CreateBufferImage(width, height, color));
-  application.SendNotification();
-  application.Render();
-  return actor;
-}
-
-
 #endif // __DALI_TOOLKIT_TEST_APPLICATION_H__
index 8b06fd1..2fb0f0c 100644 (file)
@@ -426,13 +426,13 @@ int UtcDaliBuilderConstantsP(void)
       "},"
       "\"stage\":"
       "[{"
-      "  \"type\": \"ImageActor\","
+      "  \"type\": \"ImageView\","
       "  \"name\": \"{NAME}\","
       "  \"size\": [100,100,1],"
       "  \"parentOrigin\": \"TOP_LEFT\","
       "  \"anchorPoint\": \"{ANCHOR}\","
       "  \"padding\": \"{PADDING}\","
-      "  \"image\": { \"filename\": \"dir/{IMAGE_PATH}\" },"
+      "  \"image\": { \"imageUrl\": \"dir/{IMAGE_PATH}\" },"
       "  \"sizeWidth\": \"{WIDTH}\","
       "  \"signals\": [{"
       "    \"name\": \"touched\","
@@ -496,7 +496,7 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
       "\"templates\":\n"
       "{\n"
       "  \"imageTree\": { \n"
-      "    \"type\": \"ImageActor\",\n"
+      "    \"type\": \"ImageView\",\n"
       "    \"styles\": [\"imageStyle\"],\n"
       "    \"name\": \"image\",\n"
       "    \"size\": \"{SIZE}\",\n"
@@ -506,7 +506,7 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
       "    }],\n"
       "    \"actors\": [\n"
       "      {\n"
-      "        \"type\":\"ImageActor\",\n"
+      "        \"type\":\"ImageView\",\n"
       "        \"name\":\"childImage\" \n"
       "      }\n"
       "    ]\n"
@@ -533,7 +533,7 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
 
   std::string templatejson(
     "{ \n"
-    "  \"type\": \"ImageActor\",\n"
+    "  \"type\": \"ImageView\",\n"
     "  \"styles\": [\"imageStyle\"],\n"
     "  \"name\": \"image\",\n"
     "  \"size\": \"{SIZE}\",\n"
@@ -543,7 +543,7 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
     "  }],\n"
     "  \"actors\": [\n"
     "    {\n"
-    "      \"type\":\"ImageActor\",\n"
+    "      \"type\":\"ImageView\",\n"
     "      \"name\":\"childImage\" \n"
     "    }\n"
     "  ]\n"
@@ -553,16 +553,16 @@ int UtcDaliBuilderTemplatesAndStylesP(void)
   Builder builder = Builder::New();
   builder.LoadFromString( json );
 
-  ImageActor actor = ImageActor::DownCast( builder.Create( "imageTree" ) );
+  ImageView actor = ImageView::DownCast( builder.Create( "imageTree" ) );
   DALI_TEST_CHECK( actor );
 
   Dali::Property::Map map;
   map["SIZE"] = Vector3(100,100,1);
-  actor = ImageActor::DownCast( builder.Create( "imageTree",  map ) );
+  actor = ImageView::DownCast( builder.Create( "imageTree",  map ) );
   DALI_TEST_CHECK( actor );
 
   // create from json snippet
-  actor = ImageActor::DownCast( builder.CreateFromJson( templatejson ) );
+  actor = ImageView::DownCast( builder.CreateFromJson( templatejson ) );
   DALI_TEST_CHECK( actor );
 
 
@@ -596,7 +596,7 @@ int UtcDaliBuilderRenderTasksP(void)
       "    \"name\": \"image\"\n"
       "  }, \n"
       "  { \n"
-      "    \"type\": \"ImageActor\",\n"
+      "    \"type\": \"ImageView\",\n"
       "    \"name\": \"image\",\n"
       "    \"size\": [100,100,1],\n"
       "    \"signals\": [{\n"
@@ -605,7 +605,7 @@ int UtcDaliBuilderRenderTasksP(void)
       "    }],\n"
       "    \"actors\": [\n"
       "      {\n"
-      "        \"type\":\"ImageActor\",\n"
+      "        \"type\":\"ImageView\",\n"
       "        \"name\":\"childImage\" \n"
       "      }\n"
       "    ]\n"
@@ -856,7 +856,7 @@ int UtcDaliBuilderCustomPropertyP(void)
       "\"templates\":\n"
       "{\n"
       "  \"imageTree\": { \n"
-      "    \"type\": \"ImageActor\",\n"
+      "    \"type\": \"ImageView\",\n"
       "    \"name\": \"image\",\n"
       "    \"size\": [100,100,1],\n"
       "    \"signals\": [{\n"
@@ -868,7 +868,7 @@ int UtcDaliBuilderCustomPropertyP(void)
       "    },\n"
       "    \"actors\": [\n"
       "      {\n"
-      "        \"type\":\"ImageActor\",\n"
+      "        \"type\":\"ImageView\",\n"
       "        \"name\":\"childImage\" \n"
       "      }\n"
       "    ]\n"
@@ -880,7 +880,7 @@ int UtcDaliBuilderCustomPropertyP(void)
   Builder builder = Builder::New();
   builder.LoadFromString( json );
 
-  ImageActor actor = ImageActor::DownCast( builder.Create( "imageTree" ) );
+  ImageView actor = ImageView::DownCast( builder.Create( "imageTree" ) );
   DALI_TEST_CHECK( actor );
 
   // NB: already applied in create
@@ -901,7 +901,7 @@ int UtcDaliBuilderShaderEffectP(void)
     "{\n"
     "  \"stage\": [\n"
     "    {\n"
-    "      \"type\": \"ImageActor\",\n"
+    "      \"type\": \"ImageView\",\n"
     "      \"name\": \"Image1\",\n"
     "      \"position\": [\n"
     "        0.40461349487305,\n"
@@ -1028,7 +1028,7 @@ int UtcDaliBuilderShaderEffect2P(void)
     "\"templates\":\n"
     "{\n"
     "  \"imageTree\": { \n"
-    "    \"type\": \"ImageActor\",\n"
+    "    \"type\": \"ImageView\",\n"
     "    \"size\": [100,100,1],\n"
     "    \"parentOrigin\": [0.5, 0.5, 0.5],\n"
     "    \"position\": [\n"
@@ -1042,7 +1042,7 @@ int UtcDaliBuilderShaderEffect2P(void)
     "    }],\n"
     "    \"actors\": [\n"
     "      {\n"
-    "        \"type\":\"ImageActor\",\n"
+    "        \"type\":\"ImageView\",\n"
     "        \"name\":\"childImage\" \n"
     "      }\n"
     "    ]\n"
@@ -1154,7 +1154,7 @@ int UtcDaliBuilderFrameBufferP(void)
     "  },\n"
     "  \"stage\": [\n"
     "    {\n"
-    "      \"type\": \"ImageActor\",\n"
+    "      \"type\": \"ImageView\",\n"
     "      \"name\": \"fbOnStage\",\n"
     "      \"position\": [\n"
     "        0.40461349487305,\n"
@@ -1167,17 +1167,13 @@ int UtcDaliBuilderFrameBufferP(void)
     "      \"clearColor\": [1,0,0,1]\n"
     "    },\n"
     "    {\n"
-    "      \"type\": \"ImageActor\",\n"
+    "      \"type\": \"ImageView\",\n"
     "      \"name\": \"Image1\",\n"
     "      \"size\": [200, 200, 0],\n"
     "      \"parentOrigin\": [0.5, 0.5, 0.5],\n"
     "      \"effect\": \"Ripple2D\",\n"
     "      \"image\": {\n"
-    "        \"filename\": \"{DALI_IMAGE_DIR}gallery-medium-25.jpg\",\n"
-    "        \"width\": 200,\n"
-    "        \"height\": 80,\n"
-    "        \"loadPolicy\": \"IMMEDIATE\",\n"
-    "        \"releasePolicy\": \"NEVER\"\n"
+    "        \"imageUrl\": \"{DALI_IMAGE_DIR}gallery-medium-25.jpg\"\n"
     "      },\n"
     "      \"signals\": [\n"
     "        {\n"
@@ -1294,17 +1290,13 @@ int UtcDaliBuilderPathConstraintsP(void)
     "  },\n"
     "  \"stage\": [\n"
     "    {\n"
-    "      \"type\": \"ImageActor\",\n"
+    "      \"type\": \"ImageView\",\n"
     "      \"name\": \"Image1\",\n"
     "      \"size\": [200, 200, 0],\n"
     "      \"parentOrigin\": [0.5, 0.5, 0.5],\n"
     "      \"effect\": \"Ripple2D\",\n"
     "      \"image\": {\n"
-    "        \"filename\": \"{DALI_IMAGE_DIR}gallery-medium-25.jpg\",\n"
-    "        \"width\": 200,\n"
-    "        \"height\": 80,\n"
-    "        \"loadPolicy\": \"IMMEDIATE\",\n"
-    "        \"releasePolicy\": \"NEVER\"\n"
+    "        \"imageUrl\": \"{DALI_IMAGE_DIR}gallery-medium-25.jpg\"\n"
     "      },\n"
     "      \"signals\": [\n"
     "        {\n"
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-DefaultControls.cpp b/automated-tests/src/dali-toolkit/utc-Dali-DefaultControls.cpp
deleted file mode 100644 (file)
index b65fc34..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <iostream>
-#include <stdlib.h>
-
-// Need to override adaptor classes for toolkit test harness, so include
-// test harness headers before dali headers.
-#include <dali-toolkit-test-suite-utils.h>
-
-#include <dali.h>
-#include <dali-toolkit/dali-toolkit.h>
-
-using namespace Dali;
-using namespace Toolkit;
-
-void utc_dali_toolkit_default_controls_startup(void)
-{
-  test_return_value = TET_UNDEF;
-}
-
-void utc_dali_toolkit_default_controls_cleanup(void)
-{
-  test_return_value = TET_PASS;
-}
-
-int UtcDaliDefaultControlsCreateSolidColorActor(void)
-{
-  ToolkitTestApplication application;
-
-  tet_infoline(" UtcDaliDefaultControlsCreateSolidColorActor");
-
-  ImageActor image1 = CreateSolidColorActor( Color::RED );
-  ImageActor image2 = CreateSolidColorActor( Color::RED, true, Color::BLUE, 2 );
-  ImageActor image3 = CreateSolidColorActor( Color::RED, true, Color::BLUE, 12 );
-
-  DALI_TEST_CHECK(image1);
-  DALI_TEST_CHECK(image2);
-  DALI_TEST_CHECK(!image3);
-  END_TEST;
-}
index c85bffd..4ee76fb 100644 (file)
@@ -74,7 +74,7 @@ public: // From ItemFactory
   {
     // Create an image actor for this item
     Image image = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-    Actor actor = ImageActor::New(image);
+    Actor actor = CreateRenderableActor(image);
 
     return actor;
   }
index 2cbd51b..1f96f1b 100644 (file)
@@ -115,7 +115,7 @@ public: // From ItemFactory
   {
     // Create an image actor for this item
     Image image = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-    Actor actor = ImageActor::New(image);
+    Actor actor = CreateRenderableActor(image);
 
     return actor;
   }
index eb86be2..395b409 100644 (file)
@@ -545,14 +545,14 @@ int UtcDaliKeyInputFocusManagerDestroyObject02(void)
 
   {
     BufferImage image = CreateBufferImage();
-    ImageActor imageActor = ImageActor::New( image );
-    stage.Add( imageActor );
-    imageActor.SetSize(100, 100);
+    Actor actor = CreateRenderableActor( image );
+    stage.Add( actor );
+    actor.SetSize(100, 100);
 
     application.SendNotification();
     application.Render();
 
-    stage.Remove( imageActor );
+    stage.Remove( actor );
   }
 
   DALI_TEST_CHECK( dummy2 == manager.GetCurrentFocusControl());