X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-AnimatedVectorImageVisual.cpp;h=6299c0c363626a005aa69b8de4eef432089d2eac;hb=34a9372d83f9a8a63ef0abcc93c652448e308562;hp=f69ae926c482f824e2ec6fef30fe54ed35a63828;hpb=23446c257d6ae1977bb69e53353fb1ccd5409432;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp index f69ae92..6299c0c 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp @@ -610,6 +610,9 @@ int UtcDaliAnimatedVectorImageVisualNaturalSize(void) application.SendNotification(); application.Render(); + // Trigger count is 1 - load + DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION); + visual.GetNaturalSize(naturalSize); DALI_TEST_EQUALS(naturalSize, Vector2(100.0f, 100.0f), TEST_LOCATION); // 100x100 is the content default size. @@ -706,8 +709,9 @@ int UtcDaliAnimatedVectorImageVisualPlayRange(void) Renderer renderer = actor.GetRendererAt(0u); DALI_TEST_CHECK(renderer); - Property::Map map = actor.GetProperty(DummyControl::Property::TEST_VISUAL); - Property::Value* value = map.Find(DevelImageVisual::Property::PLAY_RANGE); + Property::Map map = actor.GetProperty(DummyControl::Property::TEST_VISUAL); + Property::Value* value = map.Find(DevelImageVisual::Property::PLAY_RANGE); + int totalFrameNumber = map.Find(DevelImageVisual::Property::TOTAL_FRAME_NUMBER)->Get(); int resultStartFrame, resultEndFrame; Property::Array* result = value->GetArray(); @@ -741,8 +745,8 @@ int UtcDaliAnimatedVectorImageVisualPlayRange(void) result->GetElementAt(0).Get(resultStartFrame); result->GetElementAt(1).Get(resultEndFrame); - DALI_TEST_EQUALS(startFrame, resultStartFrame, TEST_LOCATION); // Should not be changed - DALI_TEST_EQUALS(endFrame, resultEndFrame, TEST_LOCATION); + DALI_TEST_EQUALS(resultStartFrame, 1, TEST_LOCATION); + DALI_TEST_EQUALS(resultEndFrame, totalFrameNumber - 1, TEST_LOCATION); // Should be clamped DevelControl::DoAction(actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PAUSE, Property::Map()); @@ -1511,6 +1515,9 @@ int UtcDaliAnimatedVectorImageVisualMultipleInstances(void) application.GetScene().Add(actor2); + application.SendNotification(); + application.Render(); + // Trigger count is 4 - load & render a frame for each instance DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(4), true, TEST_LOCATION); @@ -1798,6 +1805,12 @@ int UtcDaliAnimatedVectorImageVisualFrameDrops(void) application.GetScene().Add(actor); + application.SendNotification(); + application.Render(); + + // Trigger count is 2 - load, render the first frame + DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(2), true, TEST_LOCATION); + Property::Map map = actor.GetProperty(DummyControl::Property::TEST_VISUAL); Property::Value* value = map.Find(DevelImageVisual::Property::TOTAL_FRAME_NUMBER); int totalFrameNumber = value->Get(); @@ -1811,8 +1824,8 @@ int UtcDaliAnimatedVectorImageVisualFrameDrops(void) application.SendNotification(); application.Render(); - // Trigger count is 3 - load, render the first frame & calculating frame drops - DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(3), true, TEST_LOCATION); + // Trigger count is 1 - calculating frame drops + DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION); // Check dropped frame uint32_t frames = Test::VectorAnimationRenderer::GetDroppedFrames(); @@ -1842,8 +1855,14 @@ int UtcDaliAnimatedVectorImageVisualSize(void) application.SendNotification(); - // Trigger count is 2 - load, resource ready - DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(2), true, TEST_LOCATION); + // Trigger count is 1 - load + DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION); + + application.SendNotification(); + application.Render(); + + // Trigger count is 1 - resource ready + DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION); textureTrace.Enable(true);