X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-SuperBlurView.cpp;h=97592d708b31e945e9ff3ded90e85bbda81f5252;hb=864042717041b6d9ad114b2e2f360f5f07c7682b;hp=705c6e7faede7936dd4760d5502d4d81514c6aec;hpb=fa6279fb2830427d5ab569ca14e6ade1557ef2fa;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp index 705c6e7..97592d7 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp @@ -1,18 +1,19 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.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://floralicense.org/license/ -// -// 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. -// +/* + * 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 #include @@ -23,6 +24,7 @@ #include #include +#include using namespace Dali; using namespace Dali::Toolkit; @@ -74,7 +76,7 @@ int Wait(ToolkitTestApplication& application, int duration = 0) Image CreateSolidColorImage( ToolkitTestApplication& application, const Vector4& color, unsigned int width, unsigned int height ) { - BitmapImage imageData = BitmapImage::New( width, height, Pixel::RGBA8888 ); + BufferImage imageData = BufferImage::New( width, height, Pixel::RGBA8888 ); // Create the image PixelBuffer* pixbuf = imageData.GetBuffer(); @@ -144,13 +146,17 @@ int UtcDaliSuperBlurViewSetImage(void) tet_infoline(" UtcDaliSuperBlurViewSetImage "); SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS ); - // create image actors for the original image and each blurred image - DALI_TEST_CHECK( blurView.GetChildCount() == BLUR_LEVELS+1 ); + blurView.SetSize( 100.f, 100.f ); Image inputImage = CreateSolidColorImage( application, Color::GREEN, 50, 50 ); blurView.SetImage( inputImage ); // start multiple guassian blur call, each guassian blur creates two render tasks - DALI_TEST_CHECK( Stage::GetCurrent().GetRenderTaskList().GetTaskCount() == BLUR_LEVELS*2 + 1); + DALI_TEST_CHECK( Stage::GetCurrent().GetRenderTaskList().GetTaskCount() == 1+BLUR_LEVELS*2); + + // create image actors for the original image and each blurred image + Stage::GetCurrent().Add( blurView ); + Wait(application); + DALI_TEST_EQUALS(blurView.GetRendererCount(), BLUR_LEVELS+1, TEST_LOCATION ); END_TEST; } @@ -206,11 +212,11 @@ int UtcDaliSuperBlurViewGetBlurredImage(void) DALI_TEST_CHECK( image1 ); Image image2 = blurView.GetBlurredImage( 2 ); - DALI_TEST_CHECK( image2.GetWidth() == 25 ); - DALI_TEST_CHECK( image2.GetHeight() == 25 ); + DALI_TEST_EQUALS( image2.GetWidth(), 25u, TEST_LOCATION ); + DALI_TEST_EQUALS( image2.GetHeight(), 25u, TEST_LOCATION ); Image image3 = blurView.GetBlurredImage( 3 ); - DALI_TEST_CHECK( FrameBufferImage::DownCast( image2 ) ); + DALI_TEST_CHECK( FrameBufferImage::DownCast( image3 ) ); END_TEST; }