TCT fixes
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-Popup.cpp
index 29fca22..0aaf295 100644 (file)
@@ -191,7 +191,19 @@ int UtcDaliPopupSetBackgroundImage(void)
 
 int UtcDaliPopupSetTitle(void)
 {
-  // TODO
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+  tet_infoline(" UtcDaliPopupSetTitle");
+
+  // Create the Popup actor
+  Popup popup = Popup::New();
+  Stage::GetCurrent().Add( popup );
+  // Put in show state so it's layer is connected to popup (for ancestor check).
+  popup.SetState(Popup::POPUP_SHOW, 0.0f);
+
+  popup.SetTitle("title");
+
+  DALI_TEST_CHECK( popup.GetTitle() == "title" );
+
   END_TEST;
 }
 
@@ -223,7 +235,6 @@ int UtcDaliPopupSetState(void)
 
   // Create the Popup actor
   Popup popup = Popup::New();
-  Stage::GetCurrent().Add( popup );
 
   ImageActor backgroundImage = CreateSolidColorActor( Color::RED );
   popup.SetBackgroundImage(backgroundImage);
@@ -247,7 +258,6 @@ int UtcDaliPopupSetStateSlow(void)
 
   // Create the Popup actor
   Popup popup = Popup::New();
-  Stage::GetCurrent().Add( popup );
 
   ImageActor backgroundImage = CreateSolidColorActor( Color::RED );
   popup.SetBackgroundImage(backgroundImage);
@@ -281,7 +291,6 @@ int UtcDaliPopupShowHide(void)
 
   // Create the Popup actor
   Popup popup = Popup::New();
-  Stage::GetCurrent().Add( popup );
   popup.HiddenSignal().Connect( &OnPopupHidden );
 
   ImageActor backgroundImage = CreateSolidColorActor( Color::RED );
@@ -289,9 +298,9 @@ int UtcDaliPopupShowHide(void)
 
   PushButton button1 = PushButton::New();
   PushButton button2 = PushButton::New();
-  button1.SetSize(DEFAULT_BUTTON_SIZE);
+  button1.SetSize(DEFAULT_BUTTON_SIZE.GetVectorXY());
   popup.AddButton(button1);
-  button2.SetSize(DEFAULT_BUTTON_SIZE);
+  button2.SetSize(DEFAULT_BUTTON_SIZE.GetVectorXY());
   popup.AddButton(button2);
 
   // Showing/Hiding popup, results in all child Actors being