- field.SetProperty( TextField::Property::INPUT_FONT_STYLE, "{\"weight\":\"normal\",\"slant\":\"oblique\"}" );
- DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::INPUT_FONT_STYLE ), std::string("{\"weight\":\"normal\",\"slant\":\"oblique\"}"), TEST_LOCATION );
- field.SetProperty( TextField::Property::INPUT_FONT_STYLE, "{\"slant\":\"roman\"}" );
- DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::INPUT_FONT_STYLE ), std::string("{\"slant\":\"normal\"}"), TEST_LOCATION );
- field.SetProperty( TextField::Property::INPUT_FONT_STYLE, "" );
- DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::INPUT_FONT_STYLE ), std::string(""), TEST_LOCATION );
+ fontStyleMapSet.Clear();
+ fontStyleMapSet.Insert( "weight", "normal" );
+ fontStyleMapSet.Insert( "slant", "oblique" );
+
+ field.SetProperty( TextField::Property::INPUT_FONT_STYLE, fontStyleMapSet );
+ fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::INPUT_FONT_STYLE );
+ DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+ fontStyleMapSet.Clear();
+ fontStyleMapSet.Insert( "slant", "roman" );
+
+ field.SetProperty( TextField::Property::INPUT_FONT_STYLE, fontStyleMapSet );
+ fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::INPUT_FONT_STYLE );
+
+ // Replace 'roman' for 'normal'.
+ slantValue = fontStyleMapGet.Find( "slant" );
+ if( NULL != slantValue )
+ {
+ if( "normal" == slantValue->Get<std::string>() )
+ {
+ fontStyleMapGet["slant"] = "roman";
+ }
+ }
+ DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+ fontStyleMapSet.Clear();
+
+ field.SetProperty( TextField::Property::INPUT_FONT_STYLE, fontStyleMapSet );
+ fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::INPUT_FONT_STYLE );
+ DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+ Property::Map underlineMapSet;
+ Property::Map underlineMapGet;
+
+ underlineMapSet.Insert( "enable", "true" );
+ underlineMapSet.Insert( "color", "red" );
+ underlineMapSet.Insert( "height", "1" );