ImageVisual Action::Reload added
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-Popup.cpp
index 6bd2c05..3e50df3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -178,14 +178,21 @@ Integration::KeyEvent GenerateKey( const std::string& keyName,
                                    int keyCode,
                                    int keyModifier,
                                    unsigned long timeStamp,
-                                   const Integration::KeyEvent::State& keyState )
+                                   const Integration::KeyEvent::State& keyState,
+                                   const std::string& deviceName = "",
+                                   const Device::Class::Type& deviceClass = Device::Class::NONE,
+                                   const Device::Subclass::Type& deviceSubclass = Device::Subclass::NONE
+                                   )
 {
   return Integration::KeyEvent( keyName,
                                 keyString,
                                 keyCode,
                                 keyModifier,
                                 timeStamp,
-                                keyState );
+                                keyState,
+                                deviceName,
+                                deviceClass,
+                                deviceSubclass );
 }
 
 } // Anonymous namespace
@@ -916,11 +923,11 @@ int UtcDaliPopupPropertyContextualMode(void)
   // Test all contextual modes.
   const char* mode[5] = { "NON_CONTEXTUAL", "ABOVE", "RIGHT", "BELOW", "LEFT" };
   Vector2 offsetValues[5];
-  offsetValues[0] = Vector2( 0.0f, 0.0f );
-  offsetValues[1] = Vector2( 0.0f, -10.0f );
-  offsetValues[2] = Vector2( 10.0f, 0.0f );
-  offsetValues[3] = Vector2( 0.0f, 10.0f );
-  offsetValues[4] = Vector2( -10.0f, 0.0f );
+  offsetValues[0] = Vector2( 0.375f, 0.0f );
+  offsetValues[1] = Vector2( -0.125f, -10.5f );
+  offsetValues[2] = Vector2( 10.875f, -0.5f );
+  offsetValues[3] = Vector2( -0.125f, 10.5f );
+  offsetValues[4] = Vector2( -10.875f, -0.5f );
 
   for( int i = 0; i < 5; ++i )
   {
@@ -1425,7 +1432,7 @@ int UtcDaliPopupOnKeyEvent(void)
 
   popup.SetKeyInputFocus();
 
-  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", Device::Class::TOUCH, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();