X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-TextLabel.cpp;h=db4f6bdcb03a814845ac7ee67a4d8f9facba2364;hp=e0daf869c4aee0afde72a091a3562219388e08fc;hb=adcf577fae6cb7dc6f9754717028d315bf7703fa;hpb=d8a9f274a51e12a7d5690f691234e50fc06aa1fe diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index e0daf86..db4f6bd 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -1135,6 +1135,29 @@ int UtcDaliToolkitTextLabelColorComponents(void) DALI_TEST_EQUALS( label.GetProperty< Vector4 >( TextLabel::Property::TEXT_COLOR ), Vector4( 0.0f, 0.0f, 1.0f, 0.6f ), TEST_LOCATION ); DALI_TEST_EQUALS( label.GetProperty< Vector4 >( TextLabel::Property::UNUSED_PROPERTY_TEXT_COLOR ), Vector4( 0.0f, 0.0f, 1.0f, 0.6f ), TEST_LOCATION ); + // Test a transparent text - Rendering should be skipped. + label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" ); + label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE ); + + Stage::GetCurrent().Add( label ); + + TraceCallStack& drawTrace = application.GetGlAbstraction().GetDrawTrace(); + drawTrace.Enable( true ); + + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS( drawTrace.FindMethod( "DrawArrays" ), true, TEST_LOCATION ); // Should be rendered + + label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::TRANSPARENT ); + + drawTrace.Reset(); + + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS( drawTrace.FindMethod( "DrawArrays" ), false, TEST_LOCATION ); // Rendering should be skipped + END_TEST; } @@ -1287,4 +1310,4 @@ int UtcDaliToolkitTextlabelVerticalLineAlignment(void) DALI_TEST_EQUALS( label.GetProperty< int >( DevelTextLabel::Property::VERTICAL_LINE_ALIGNMENT ), static_cast< int >( Toolkit::DevelText::VerticalLineAlignment::BOTTOM ), TEST_LOCATION ); END_TEST; -} \ No newline at end of file +}