/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
*
*/
-#include <iostream>
-#include <stdlib.h>
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <dali/devel-api/actors/actor-devel.h>
#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/public-api/transition/transition-set.h>
+#include <dali-toolkit/public-api/transition/fade-transition.h>
+#include <dali-toolkit/public-api/transition/slide-transition.h>
#include <dali-toolkit/public-api/transition/transition-base.h>
+#include <dali-toolkit/public-api/transition/transition-set.h>
#include <dali-toolkit/public-api/transition/transition.h>
+#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/public-api/rendering/decorated-visual-renderer.h> // for Renderer Property Index.
+#include <stdlib.h>
+#include <iostream>
using namespace Dali;
using namespace Dali::Toolkit;
namespace
{
-
const char* TEST_IMAGE_FILE_NAME = TEST_RESOURCE_DIR "/gallery-small-1.jpg";
}
controlProperty1.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
controlProperty1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 50.f);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 50.f);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, 1.f);
control1.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty1);
Control control2 = Control::New();
controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
controlProperty2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.f);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 30.f);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
control2.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty2);
application.GetScene().Add(control1);
application.SendNotification();
application.Render(20);
- Transition transition = Transition::New(control1, control2, TimePeriod(-0.1f));
- transition.ShowSourceAfterFinished(true);
- DALI_TEST_EQUALS(0.0f, transition.GetDuration(), TEST_LOCATION);
- DALI_TEST_EQUALS(0.0f, transition.GetDelay(), TEST_LOCATION);
-
- transition.SetDuration(0.5f);
- transition.SetDelay(0.2f);
- DALI_TEST_EQUALS(0.5f, transition.GetDuration(), TEST_LOCATION);
- DALI_TEST_EQUALS(0.2f, transition.GetDelay(), TEST_LOCATION);
+ Transition transition = Transition::New(control1, control2, true, TimePeriod(-0.1f, -0.1f));
+ TimePeriod timePeriod = transition.GetTimePeriod();
+ DALI_TEST_EQUALS(0.0f, timePeriod.durationSeconds, TEST_LOCATION);
+ DALI_TEST_EQUALS(0.0f, timePeriod.delaySeconds, TEST_LOCATION);
transition.SetTimePeriod(TimePeriod(0.5f, 1.0f));
- DALI_TEST_EQUALS(1.0f, transition.GetDuration(), TEST_LOCATION);
- DALI_TEST_EQUALS(0.5f, transition.GetDelay(), TEST_LOCATION);
+ timePeriod = transition.GetTimePeriod();
+ DALI_TEST_EQUALS(1.0f, timePeriod.durationSeconds, TEST_LOCATION);
+ DALI_TEST_EQUALS(0.5f, timePeriod.delaySeconds, TEST_LOCATION);
DALI_TEST_EQUALS(Dali::AlphaFunction::DEFAULT, transition.GetAlphaFunction().GetBuiltinFunction(), TEST_LOCATION);
transition.SetAlphaFunction(Dali::AlphaFunction::EASE_IN_OUT);
controlProperty1.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
controlProperty1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, Vector4(50.0f, 30.0f, 40.0f, 20.0f));
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 50.f);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
control1.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty1);
Control control2 = Control::New();
controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
controlProperty2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, Vector4(32.f, 54.0f, 24.0f, 42.0f));
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 30.f);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
control2.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty2);
application.GetScene().Add(control1);
application.SendNotification();
application.Render(20);
- Transition transition = Transition::New(control1, control2, TimePeriod(-0.1f));
- transition.ShowSourceAfterFinished(true);
- DALI_TEST_EQUALS(0.0f, transition.GetDuration(), TEST_LOCATION);
- DALI_TEST_EQUALS(0.0f, transition.GetDelay(), TEST_LOCATION);
-
- transition.SetDuration(0.5f);
- transition.SetDelay(0.2f);
- DALI_TEST_EQUALS(0.5f, transition.GetDuration(), TEST_LOCATION);
- DALI_TEST_EQUALS(0.2f, transition.GetDelay(), TEST_LOCATION);
+ Transition transition = Transition::New(control1, control2, true, TimePeriod(-0.1f));
+ TimePeriod timePeriod = transition.GetTimePeriod();
+ DALI_TEST_EQUALS(0.0f, timePeriod.durationSeconds, TEST_LOCATION);
+ DALI_TEST_EQUALS(0.0f, timePeriod.delaySeconds, TEST_LOCATION);
transition.SetTimePeriod(TimePeriod(0.5f, 1.0f));
- DALI_TEST_EQUALS(1.0f, transition.GetDuration(), TEST_LOCATION);
- DALI_TEST_EQUALS(0.5f, transition.GetDelay(), TEST_LOCATION);
+ timePeriod = transition.GetTimePeriod();
+ DALI_TEST_EQUALS(1.0f, timePeriod.durationSeconds, TEST_LOCATION);
+ DALI_TEST_EQUALS(0.5f, timePeriod.delaySeconds, TEST_LOCATION);
DALI_TEST_EQUALS(Dali::AlphaFunction::DEFAULT, transition.GetAlphaFunction().GetBuiltinFunction(), TEST_LOCATION);
transition.SetAlphaFunction(Dali::AlphaFunction::EASE_IN_OUT);
Vector3 destinationSize(120, 120, 0);
Vector3 destinationScale(2, 1, 0);
Vector4 destinationColor(1.0f, 0.5f, 1.0f, 0.8f);
- float destinationOpacity(0.8f);
- float destinationRadius(50.f);
+ float destinationOpacity(0.8f);
+ float destinationRadius(50.f);
+ float destinationBorderlineWidth(80.0f);
+ Vector4 destinationBorderlineColor(0.5f, 1.0f, 0.5f, 0.3f);
+ float destinationBorderlineOffset(-1.0f);
Vector4 destinationRadiusV4 = Vector4(destinationRadius, destinationRadius, destinationRadius, destinationRadius);
Control control1 = Control::New();
controlProperty1.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
controlProperty1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.f);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 60.f);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, 1.f);
control1.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty1);
Control control2 = Control::New();
controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
controlProperty2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, destinationRadius);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, destinationBorderlineWidth);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, destinationBorderlineColor);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, destinationBorderlineOffset);
control2.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty2);
DALI_TEST_EQUALS(destinationPosition, control2.GetProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
Property::Map backgroundMap = control2.GetProperty<Property::Map>(Toolkit::Control::Property::BACKGROUND);
- Vector4 cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
+ Vector4 cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
DALI_TEST_EQUALS(destinationRadiusV4, cornerRadius, TEST_LOCATION);
+ float borderlineWidth = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+ Vector4 borderlineColor = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_COLOR)->Get<Vector4>();
+ DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+ float borderlineOffset = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
application.GetScene().Add(control1);
application.GetScene().Add(control2);
application.SendNotification();
application.Render(20);
- Transition transition = Transition::New(control1, control2, TimePeriod(0.5f));
+ Transition transition = Transition::New(control1, control2, true, TimePeriod(0.5f));
TransitionSet transitionSet = TransitionSet::New();
transitionSet.AddTransition(transition);
transitionSet.Play();
- bool signalReceived(false);
+ bool signalReceived(false);
TransitionFinishCheck finishCheck(signalReceived);
transitionSet.FinishedSignal().Connect(&application, finishCheck);
DALI_TEST_NOT_EQUALS(destinationPosition, control2.GetCurrentProperty<Vector3>(Actor::Property::POSITION), 0.00001f, TEST_LOCATION);
DALI_TEST_EQUALS(1, control2.GetRendererCount(), TEST_LOCATION);
Dali::Renderer renderer = control2.GetRendererAt(0);
- Property::Index index = renderer.GetPropertyIndex(DevelVisual::Property::CORNER_RADIUS);
- cornerRadius = renderer.GetCurrentProperty<Vector4>(index);
+ cornerRadius = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::CORNER_RADIUS);
DALI_TEST_NOT_EQUALS(destinationRadiusV4, cornerRadius, 0.00001f, TEST_LOCATION);
+ borderlineWidth = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_WIDTH);
+ DALI_TEST_NOT_EQUALS(destinationBorderlineWidth, borderlineWidth, 0.00001f, TEST_LOCATION);
+ borderlineColor = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::BORDERLINE_COLOR);
+ DALI_TEST_NOT_EQUALS(destinationBorderlineColor, borderlineColor, 0.00001f, TEST_LOCATION);
+ borderlineOffset = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_OFFSET);
+ DALI_TEST_NOT_EQUALS(destinationBorderlineOffset, borderlineOffset, 0.00001f, TEST_LOCATION);
application.SendNotification();
application.Render(700);
DALI_TEST_EQUALS(destinationColor, control2.GetCurrentProperty<Vector4>(Actor::Property::COLOR), TEST_LOCATION);
DALI_TEST_EQUALS(destinationOpacity, control2.GetCurrentProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
DALI_TEST_EQUALS(1, control2.GetRendererCount(), TEST_LOCATION);
- renderer = control2.GetRendererAt(0);
- index = renderer.GetPropertyIndex(DevelVisual::Property::CORNER_RADIUS);
- cornerRadius = renderer.GetCurrentProperty<Vector4>(index);
+ renderer = control2.GetRendererAt(0);
+ cornerRadius = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::CORNER_RADIUS);
DALI_TEST_EQUALS(destinationRadiusV4, cornerRadius, TEST_LOCATION);
+ borderlineWidth = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_WIDTH);
+ DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+ borderlineColor = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::BORDERLINE_COLOR);
+ DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+ borderlineOffset = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_OFFSET);
+ DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliTransitionBetweenControlPair2(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliTransitionBetweenControlPair2 - source target will be transitioned.");
+
+ Vector3 sourcePosition(100, 200, 0);
+ Vector3 sourceSize(150, 150, 0);
+ Vector3 sourceScale(1, 2, 0);
+ Vector4 sourceColor(1.0f, 1.0f, 1.0f, 0.5f);
+ float sourceOpacity(0.5f);
+ float sourceRadius(30.f);
+ float sourceBorderlineWidth(60.0f);
+ Vector4 sourceBorderlineColor(1.0f, 0.0f, 0.0f, 1.0f);
+ float sourceBorderlineOffset(1.f);
+ Vector4 sourceRadiusV4 = Vector4(sourceRadius, sourceRadius, sourceRadius, sourceRadius);
+
+ Vector3 destinationPosition(50, 50, 0);
+ Vector3 destinationSize(120, 120, 0);
+ Vector3 destinationScale(2, 1, 0);
+ Vector4 destinationColor(1.0f, 0.5f, 1.0f, 0.8f);
+ float destinationOpacity(0.8f);
+ float destinationRadius(50.f);
+ float destinationBorderlineWidth(80.0f);
+ Vector4 destinationBorderlineColor(0.5f, 1.0f, 0.5f, 0.3f);
+ float destinationBorderlineOffset(-1.0f);
+ Vector4 destinationRadiusV4 = Vector4(destinationRadius, destinationRadius, destinationRadius, destinationRadius);
+
+ Control control1 = Control::New();
+ control1.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
+ control1.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
+ control1.SetProperty(Actor::Property::POSITION, sourcePosition);
+ control1.SetProperty(Actor::Property::SIZE, sourceSize);
+ control1.SetProperty(Actor::Property::SCALE, sourceScale);
+ control1.SetProperty(Actor::Property::COLOR, sourceColor);
+ control1.SetProperty(Actor::Property::OPACITY, sourceOpacity);
+ Property::Map controlProperty1;
+ controlProperty1.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
+ controlProperty1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, sourceRadius);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, sourceBorderlineWidth);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, sourceBorderlineColor);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, sourceBorderlineOffset);
+ control1.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty1);
+
+ Control control2 = Control::New();
+ control2.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
+ control2.SetProperty(Actor::Property::ANCHOR_POINT, ParentOrigin::CENTER);
+ control2.SetProperty(Actor::Property::POSITION, destinationPosition);
+ control2.SetProperty(Actor::Property::SIZE, destinationSize);
+ control2.SetProperty(Actor::Property::SCALE, destinationScale);
+ control2.SetProperty(Actor::Property::COLOR, destinationColor);
+ control2.SetProperty(Actor::Property::OPACITY, destinationOpacity);
+ Property::Map controlProperty2;
+ controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
+ controlProperty2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, destinationRadius);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, destinationBorderlineWidth);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, destinationBorderlineColor);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, destinationBorderlineOffset);
+ control2.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty2);
+
+ DALI_TEST_EQUALS(destinationPosition, control2.GetProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
+ Property::Map backgroundMap = control2.GetProperty<Property::Map>(Toolkit::Control::Property::BACKGROUND);
+ Vector4 cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
+ DALI_TEST_EQUALS(destinationRadiusV4, cornerRadius, TEST_LOCATION);
+ float borderlineWidth = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+ Vector4 borderlineColor = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_COLOR)->Get<Vector4>();
+ DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+ float borderlineOffset = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
+
+ application.GetScene().Add(control1);
+ application.GetScene().Add(control2);
+
+ application.SendNotification();
+ application.Render(20);
+
+ Transition transition = Transition::New(control1, control2, false, TimePeriod(0.5f));
+ TransitionSet transitionSet = TransitionSet::New();
+ transitionSet.AddTransition(transition);
+ transitionSet.Play();
+
+ bool signalReceived(false);
+ TransitionFinishCheck finishCheck(signalReceived);
+ transitionSet.FinishedSignal().Connect(&application, finishCheck);
+
+ application.SendNotification();
+ application.Render(50);
+
+ // We didn't expect the animation to finish yet
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+
+ DALI_TEST_NOT_EQUALS(destinationPosition, control1.GetCurrentProperty<Vector3>(Actor::Property::POSITION), 0.00001f, TEST_LOCATION);
+ DALI_TEST_EQUALS(1, control1.GetRendererCount(), TEST_LOCATION);
+
+ Dali::Renderer renderer = control1.GetRendererAt(0);
+ cornerRadius = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::CORNER_RADIUS);
+ DALI_TEST_NOT_EQUALS(destinationRadiusV4, cornerRadius, 0.00001f, TEST_LOCATION);
+
+ borderlineWidth = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_WIDTH);
+ DALI_TEST_NOT_EQUALS(destinationBorderlineWidth, borderlineWidth, 0.00001f, TEST_LOCATION);
+
+ borderlineColor = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::BORDERLINE_COLOR);
+ DALI_TEST_NOT_EQUALS(destinationBorderlineColor, borderlineColor, 0.00001f, TEST_LOCATION);
+
+ borderlineOffset = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_OFFSET);
+ DALI_TEST_NOT_EQUALS(destinationBorderlineOffset, borderlineOffset, 0.00001f, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(700);
+
+ // We did expect the animation to finish
+ application.SendNotification();
+ finishCheck.CheckSignalReceived();
+
+ // After the transition is finished,
+ // every current and renderer propeties of control1 are equal to destination properties.
+ DALI_TEST_EQUALS(destinationPosition, control1.GetCurrentProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
+ DALI_TEST_EQUALS(destinationSize, control1.GetCurrentProperty<Vector3>(Actor::Property::SIZE), TEST_LOCATION);
+ DALI_TEST_EQUALS(destinationScale, control1.GetCurrentProperty<Vector3>(Actor::Property::SCALE), TEST_LOCATION);
+ DALI_TEST_EQUALS(destinationColor, control1.GetCurrentProperty<Vector4>(Actor::Property::COLOR), TEST_LOCATION);
+ DALI_TEST_EQUALS(destinationOpacity, control1.GetCurrentProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
+
+ DALI_TEST_EQUALS(1, control1.GetRendererCount(), TEST_LOCATION);
+ renderer = control1.GetRendererAt(0);
+ cornerRadius = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::CORNER_RADIUS);
+ DALI_TEST_EQUALS(destinationRadiusV4, cornerRadius, TEST_LOCATION);
+
+ borderlineWidth = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_WIDTH);
+ DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+
+ borderlineColor = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::BORDERLINE_COLOR);
+ DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+
+ borderlineOffset = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_OFFSET);
+ DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
+
+ // every actor properties of control1 are returned to the source properties.
+ DALI_TEST_EQUALS(sourcePosition, control1.GetProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
+ DALI_TEST_EQUALS(sourceSize, control1.GetProperty<Vector3>(Actor::Property::SIZE), TEST_LOCATION);
+ DALI_TEST_EQUALS(sourceScale, control1.GetProperty<Vector3>(Actor::Property::SCALE), TEST_LOCATION);
+ DALI_TEST_EQUALS(sourceColor, control1.GetProperty<Vector4>(Actor::Property::COLOR), TEST_LOCATION);
+ DALI_TEST_EQUALS(sourceOpacity, control1.GetProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(20);
+
+ // after next update, renderer properties are returned to the source properties.
+ DALI_TEST_EQUALS(1, control1.GetRendererCount(), TEST_LOCATION);
+ renderer = control1.GetRendererAt(0);
+ cornerRadius = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::CORNER_RADIUS);
+ DALI_TEST_EQUALS(sourceRadiusV4, cornerRadius, TEST_LOCATION);
+
+ borderlineWidth = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_WIDTH);
+ DALI_TEST_EQUALS(sourceBorderlineWidth, borderlineWidth, TEST_LOCATION);
+
+ borderlineColor = renderer.GetCurrentProperty<Vector4>(DecoratedVisualRenderer::Property::BORDERLINE_COLOR);
+ DALI_TEST_EQUALS(sourceBorderlineColor, borderlineColor, TEST_LOCATION);
+
+ borderlineOffset = renderer.GetCurrentProperty<float>(DecoratedVisualRenderer::Property::BORDERLINE_OFFSET);
+ DALI_TEST_EQUALS(sourceBorderlineOffset, borderlineOffset, TEST_LOCATION);
END_TEST;
}
tet_infoline(" UtcDaliTransitionBetweenControlPair");
Vector4 destinationRadius(50.f, 30.f, 40.f, 0.f);
+ float destinationBorderlineWidth(40.f);
+ Vector4 destinationBorderlineColor(1.0f, 0.5f, 0.2f, 0.8f);
+ float destinationBorderlineOffset(1.f);
Control control1 = Control::New();
control1.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
controlProperty2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.0f, 0.5f));
controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, destinationRadius);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, destinationBorderlineWidth);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, destinationBorderlineColor);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, destinationBorderlineOffset);
control2.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty2);
Property::Map backgroundMap = control2.GetProperty<Property::Map>(Toolkit::Control::Property::BACKGROUND);
- Vector4 cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
+ Vector4 cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
DALI_TEST_EQUALS(destinationRadius, cornerRadius, TEST_LOCATION);
+ float borderlineWidth = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+ Vector4 borderlineColor = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_COLOR)->Get<Vector4>();
+ DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+ float borderlineOffset = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
application.GetScene().Add(control1);
application.GetScene().Add(control2);
application.SendNotification();
application.Render(20);
- Transition transition = Transition::New(control1, control2, TimePeriod(0.5f));
+ Transition transition = Transition::New(control1, control2, true, TimePeriod(0.5f));
TransitionSet transitionSet = TransitionSet::New();
transitionSet.AddTransition(transition);
transitionSet.Play();
- bool signalReceived(false);
+ bool signalReceived(false);
TransitionFinishCheck finishCheck(signalReceived);
transitionSet.FinishedSignal().Connect(&application, finishCheck);
finishCheck.CheckSignalNotReceived();
backgroundMap = control2.GetProperty<Property::Map>(Toolkit::Control::Property::BACKGROUND);
- cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
+ cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
DALI_TEST_EQUALS(destinationRadius, cornerRadius, TEST_LOCATION);
+ borderlineWidth = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+ borderlineColor = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_COLOR)->Get<Vector4>();
+ DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+ borderlineOffset = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
application.SendNotification();
application.Render(700);
application.Render(20);
backgroundMap = control2.GetProperty<Property::Map>(Toolkit::Control::Property::BACKGROUND);
- cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
+ cornerRadius = backgroundMap.Find(Toolkit::DevelVisual::Property::CORNER_RADIUS)->Get<Vector4>();
DALI_TEST_EQUALS(destinationRadius, cornerRadius, TEST_LOCATION);
+ borderlineWidth = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineWidth, borderlineWidth, TEST_LOCATION);
+ borderlineColor = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_COLOR)->Get<Vector4>();
+ DALI_TEST_EQUALS(destinationBorderlineColor, borderlineColor, TEST_LOCATION);
+ borderlineOffset = backgroundMap.Find(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET)->Get<float>();
+ DALI_TEST_EQUALS(destinationBorderlineOffset, borderlineOffset, TEST_LOCATION);
END_TEST;
}
controlProperty1.Insert(Toolkit::ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME);
controlProperty1.Insert(Toolkit::Visual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.5f, 0.5f));
controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 50.f);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 50.f);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, 1.f);
control1.SetProperty(Toolkit::ImageView::Property::IMAGE, controlProperty1);
ImageView control2 = ImageView::New();
controlProperty2.Insert(Toolkit::ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME);
controlProperty2.Insert(Toolkit::Visual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 1.0f, 1.0f));
controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.f);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 30.f);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(0.0f, 1.0f, 1.0f, 0.5f));
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
control2.SetProperty(Toolkit::ImageView::Property::IMAGE, controlProperty2);
DALI_TEST_EQUALS(destinationPosition, control2.GetProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
application.SendNotification();
application.Render(20);
- Transition transition = Transition::New(control1, control2, TimePeriod(0.5f));
+ Vector3 startWorldPosition = control1.GetProperty<Vector3>(Actor::Property::WORLD_POSITION);
+ Vector3 finishWorldPosition = control2.GetProperty<Vector3>(Actor::Property::WORLD_POSITION);
+
+ Transition transition = Transition::New(control1, control2, true, TimePeriod(0.5f));
TransitionSet transitionSet = TransitionSet::New();
transitionSet.AddTransition(transition);
transitionSet.Play();
- bool signalReceived(false);
+ bool signalReceived(false);
TransitionFinishCheck finishCheck(signalReceived);
transitionSet.FinishedSignal().Connect(&application, finishCheck);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_NOT_EQUALS(destinationPosition, control2.GetCurrentProperty<Vector3>(Actor::Property::POSITION), 0.00001f, TEST_LOCATION);
+ // control2 moved about 80%
+ Vector3 currentPosition = control2.GetCurrentProperty<Vector3>(Actor::Property::POSITION);
+ Vector3 expectedPosition_0_7 = startWorldPosition + (finishWorldPosition - startWorldPosition) * 0.7;
+ Vector3 expectedPosition_0_9 = startWorldPosition + (finishWorldPosition - startWorldPosition) * 0.9;
+ DALI_TEST_CHECK(currentPosition.x <= expectedPosition_0_7.x && currentPosition.x >= expectedPosition_0_9.x);
+ DALI_TEST_CHECK(currentPosition.y <= expectedPosition_0_7.y && currentPosition.y >= expectedPosition_0_9.y);
application.SendNotification();
application.Render(200);
END_TEST;
}
+int UtcDaliTransitionBetweenImageViewPairWithDelay(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliTransitionBetweenControlPair");
+
+ Vector3 destinationPosition(50, 50, 0);
+
+ ImageView control1 = ImageView::New();
+ control1.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ control1.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ control1.SetProperty(Actor::Property::POSITION, Vector3(100, 200, 0));
+ control1.SetProperty(Actor::Property::SIZE, Vector3(150, 150, 0));
+ Property::Map controlProperty1;
+ controlProperty1.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE);
+ controlProperty1.Insert(Toolkit::ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME);
+ controlProperty1.Insert(Toolkit::Visual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 0.5f, 0.5f));
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 50.f);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 50.f);
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+ controlProperty1.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, 1.f);
+ control1.SetProperty(Toolkit::ImageView::Property::IMAGE, controlProperty1);
+
+ ImageView control2 = ImageView::New();
+ control2.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ control2.SetProperty(Actor::Property::ANCHOR_POINT, ParentOrigin::TOP_LEFT);
+ control2.SetProperty(Actor::Property::POSITION, destinationPosition);
+ control2.SetProperty(Actor::Property::SIZE, Vector3(120, 120, 0));
+ Property::Map controlProperty2;
+ controlProperty2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE);
+ controlProperty2.Insert(Toolkit::ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME);
+ controlProperty2.Insert(Toolkit::Visual::Property::MIX_COLOR, Vector4(1.0f, 1.0f, 1.0f, 1.0f));
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.f);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_WIDTH, 30.f);
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_COLOR, Vector4(0.0f, 1.0f, 1.0f, 0.5f));
+ controlProperty2.Insert(Toolkit::DevelVisual::Property::BORDERLINE_OFFSET, -1.f);
+ control2.SetProperty(Toolkit::ImageView::Property::IMAGE, controlProperty2);
+
+ DALI_TEST_EQUALS(destinationPosition, control2.GetProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
+
+ application.GetScene().Add(control1);
+ application.GetScene().Add(control2);
+
+ application.SendNotification();
+ application.Render(20);
+
+ Vector3 startWorldPosition = control1.GetProperty<Vector3>(Actor::Property::WORLD_POSITION);
+ Vector3 finishWorldPosition = control2.GetProperty<Vector3>(Actor::Property::WORLD_POSITION);
+
+ Transition transition = Transition::New(control1, control2, true, TimePeriod(0.5f, 0.5f));
+ TransitionSet transitionSet = TransitionSet::New();
+ transitionSet.AddTransition(transition);
+ transitionSet.Play();
+
+ bool signalReceived(false);
+ TransitionFinishCheck finishCheck(signalReceived);
+ transitionSet.FinishedSignal().Connect(&application, finishCheck);
+
+ application.SendNotification();
+ application.Render(400);
+
+ // We didn't expect the animation to finish yet
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+
+ DALI_TEST_EQUALS(startWorldPosition, control2.GetCurrentProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(400);
+
+ // We didn't expect the animation to finish yet
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+
+ // control2 moved about 60% (800ms)
+ Vector3 currentPosition = control2.GetCurrentProperty<Vector3>(Actor::Property::POSITION);
+ Vector3 expectedPosition_0_5 = startWorldPosition + (finishWorldPosition - startWorldPosition) * 0.5;
+ Vector3 expectedPosition_0_7 = startWorldPosition + (finishWorldPosition - startWorldPosition) * 0.7;
+ DALI_TEST_CHECK(currentPosition.x <= expectedPosition_0_5.x && currentPosition.x >= expectedPosition_0_7.x);
+ DALI_TEST_CHECK(currentPosition.y <= expectedPosition_0_5.y && currentPosition.y >= expectedPosition_0_7.y);
+
+ application.SendNotification();
+ application.Render(400);
+
+ // We did expect the animation to finish
+ application.SendNotification();
+ finishCheck.CheckSignalReceived();
+
+ DALI_TEST_NOT_EQUALS(destinationPosition, control2.GetCurrentProperty<Vector3>(Actor::Property::POSITION), 0.00001f, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render(20);
+
+ DALI_TEST_EQUALS(destinationPosition, control2.GetCurrentProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
+
+ END_TEST;
+}
+
int UtcDaliTransitionBetweenControlPairWithTree(void)
{
ToolkitTestApplication application;
application.SendNotification();
application.Render(20);
- Transition transition = Transition::New(control1, control2, TimePeriod(0.5f));
+ Transition transition = Transition::New(control1, control2, true, TimePeriod(0.5f));
TransitionSet transitionSet = TransitionSet::New();
transitionSet.AddTransition(transition);
transitionSet.Play();
- bool signalReceived(false);
+ bool signalReceived(false);
TransitionFinishCheck finishCheck(signalReceived);
transitionSet.FinishedSignal().Connect(&application, finishCheck);
application.SendNotification();
application.Render(20);
- Transition transition = Transition::New(control1, control2, TimePeriod(0.5f));
+ Transition transition = Transition::New(control1, control2, true, TimePeriod(0.5f));
transition.TransitionWithChild(true);
TransitionSet transitionSet = TransitionSet::New();
transitionSet.AddTransition(transition);
transitionSet.Play();
- bool signalReceived(false);
+ bool signalReceived(false);
TransitionFinishCheck finishCheck(signalReceived);
transitionSet.FinishedSignal().Connect(&application, finishCheck);
application.SendNotification();
application.Render(20);
- Transition transition;
- TransitionSet transitionSet;
- bool signalReceived(false);
+ Transition transition;
+ TransitionSet transitionSet;
+ bool signalReceived(false);
TransitionFinishCheck finishCheck(signalReceived);
// not inherit Position.
control3.SetProperty(Actor::Property::INHERIT_ORIENTATION, true);
control3.SetProperty(Actor::Property::INHERIT_SCALE, true);
- transition = Transition::New(control1, control3, TimePeriod(0.5f));
+ transition = Transition::New(control1, control3, true, TimePeriod(0.5f));
transitionSet = TransitionSet::New();
transitionSet.AddTransition(transition);
transitionSet.Play();
ToolkitTestApplication application;
tet_infoline(" UtcDaliTransitionBetweenControlPairWithTreeWithoutOrientationInheritance");
- Radian sourceAngle(1.0f);
- Radian destinationAngle(2.0f);
+ Radian sourceAngle(1.0f);
+ Radian destinationAngle(2.0f);
Quaternion sourceOrientation(sourceAngle, Vector3::XAXIS);
Quaternion destinationOrientation(destinationAngle, Vector3::XAXIS);
control3.SetProperty(Actor::Property::INHERIT_SCALE, true);
Vector3 currentAxis;
- Radian currentRadian;
+ Radian currentRadian;
application.GetScene().Add(control1);
application.GetScene().Add(control2);
Quaternion currentOrientation = control3.GetProperty<Quaternion>(Actor::Property::WORLD_ORIENTATION);
DALI_TEST_EQUALS(currentOrientation, destinationOrientation, 0.0001f, TEST_LOCATION);
- Transition transition;
- TransitionSet transitionSet;
- bool signalReceived(false);
+ Transition transition;
+ TransitionSet transitionSet;
+ bool signalReceived(false);
TransitionFinishCheck finishCheck(signalReceived);
- transition = Transition::New(control1, control3, TimePeriod(0.5f));
+ transition = Transition::New(control1, control3, true, TimePeriod(0.5f));
transitionSet = TransitionSet::New();
transitionSet.AddTransition(transition);
transitionSet.Play();
Vector3 currentScale = control3.GetProperty<Vector3>(Actor::Property::WORLD_SCALE);
DALI_TEST_EQUALS(currentScale, destinationScale, 0.0001f, TEST_LOCATION);
- Transition transition;
- TransitionSet transitionSet;
- bool signalReceived(false);
+ Transition transition;
+ TransitionSet transitionSet;
+ bool signalReceived(false);
TransitionFinishCheck finishCheck(signalReceived);
- transition = Transition::New(control1, control3, TimePeriod(0.5f));
+ transition = Transition::New(control1, control3, true, TimePeriod(0.5f));
transitionSet = TransitionSet::New();
transitionSet.AddTransition(transition);
transitionSet.Play();
END_TEST;
}
+
+int UtcDaliMultipleTransitionAppearing(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("UtcDaliMultipleTransitionAppearing");
+
+ Control control = Control::New();
+ control.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ control.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ control.SetProperty(Actor::Property::POSITION, Vector3(100, 200, 0));
+ control.SetProperty(Actor::Property::SIZE, Vector3(150, 150, 0));
+ Property::Map controlProperty;
+ controlProperty.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
+ controlProperty.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+ control.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty);
+
+ application.GetScene().Add(control);
+
+ application.SendNotification();
+ application.Render(20);
+
+ DALI_TEST_EQUALS(1.0f, control.GetCurrentProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
+
+ TransitionSet transitionSet = TransitionSet::New();
+ FadeTransition fade = FadeTransition::New(control, 0.5, TimePeriod(1.0f, 1.0f));
+ fade.SetAppearingTransition(true); // set fade in
+ transitionSet.AddTransition(fade);
+ SlideTransition slide = SlideTransition::New(control, Dali::Toolkit::SlideTransitionDirection::BOTTOM, TimePeriod(0.5f, 1.0f));
+ slide.SetAppearingTransition(true); // set slide
+ transitionSet.AddTransition(slide);
+ transitionSet.Play();
+
+ bool signalReceived(false);
+ TransitionFinishCheck finishCheck(signalReceived);
+ transitionSet.FinishedSignal().Connect(&application, finishCheck);
+
+ application.SendNotification();
+ application.Render(300);
+
+ float currentOpacity = control.GetCurrentProperty<float>(Actor::Property::OPACITY);
+ DALI_TEST_CHECK(currentOpacity == 0.0f);
+
+ application.SendNotification();
+ application.Render(400);
+
+ currentOpacity = control.GetCurrentProperty<float>(Actor::Property::OPACITY);
+ DALI_TEST_CHECK(currentOpacity == 0.5f);
+
+ application.SendNotification();
+ application.Render(500);
+
+ currentOpacity = control.GetCurrentProperty<float>(Actor::Property::OPACITY);
+ DALI_TEST_CHECK(currentOpacity > 0.5f && currentOpacity < 1.0f);
+
+ application.SendNotification();
+ application.Render(500);
+
+ currentOpacity = control.GetCurrentProperty<float>(Actor::Property::OPACITY);
+ DALI_TEST_CHECK(currentOpacity > 0.5f && currentOpacity < 1.0f);
+
+ // We didn't expect the animation to finish yet
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+
+ application.SendNotification();
+ application.Render(500);
+
+ // We did expect the animation to finish
+ application.SendNotification();
+ finishCheck.CheckSignalReceived();
+
+ application.SendNotification();
+ application.Render(20);
+
+ DALI_TEST_EQUALS(1.0f, control.GetCurrentProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
+
+ END_TEST;
+}