#include "ITs-key-grab-common.h"
-#define KEY_COUNT 42
-#define KEY_MODE_COUNT 4
+#define KEY_COUNT 7
+#define KEY_MODE_COUNT 1
/** @addtogroup itc-dali-adaptor
* @brief Integrated testsuites for module dali-adaptor
KeyGrapModeTest daliKeyGrabModes[KEY_MODE_COUNT]=
{
{"KeyGrab::TOPMOST",KeyGrab::TOPMOST},
- {"KeyGrab::SHARED",KeyGrab::SHARED},
- {"KeyGrab::OVERRIDE_EXCLUSIVE",KeyGrab::OVERRIDE_EXCLUSIVE},
- {"KeyGrab::EXCLUSIVE",KeyGrab::EXCLUSIVE}
};
KeyGrapTest daliKeys[KEY_COUNT]=
{
- {"DALI_KEY_INVALID",DALI_KEY_INVALID},
- {"DALI_KEY_ESCAPE",DALI_KEY_ESCAPE},
- {"DALI_KEY_BACKSPACE",DALI_KEY_BACKSPACE},
- {"DALI_KEY_SHIFT_LEFT",DALI_KEY_SHIFT_LEFT},
- {"DALI_KEY_SHIFT_RIGHT",DALI_KEY_SHIFT_RIGHT},
- {"DALI_KEY_CURSOR_UP",DALI_KEY_CURSOR_UP},
- {"DALI_KEY_CURSOR_LEFT",DALI_KEY_CURSOR_LEFT},
- {"DALI_KEY_CURSOR_RIGHT",DALI_KEY_CURSOR_RIGHT},
- {"DALI_KEY_CURSOR_DOWN",DALI_KEY_CURSOR_DOWN},
{"DALI_KEY_BACK",DALI_KEY_BACK},
- {"DALI_KEY_CAMERA",DALI_KEY_CAMERA},
- {"DALI_KEY_CONFIG",DALI_KEY_CONFIG},
{"DALI_KEY_POWER",DALI_KEY_POWER},
- {"DALI_KEY_PAUSE",DALI_KEY_PAUSE},
- {"DALI_KEY_CANCEL",DALI_KEY_CANCEL},
- {"DALI_KEY_PLAY_CD",DALI_KEY_PLAY_CD},
- {"DALI_KEY_STOP_CD",DALI_KEY_STOP_CD},
- {"DALI_KEY_PAUSE_CD",DALI_KEY_PAUSE_CD},
- {"DALI_KEY_NEXT_SONG",DALI_KEY_NEXT_SONG},
- {"DALI_KEY_PREVIOUS_SONG",DALI_KEY_PREVIOUS_SONG},
- {"DALI_KEY_REWIND",DALI_KEY_REWIND},
- {"DALI_KEY_FASTFORWARD",DALI_KEY_FASTFORWARD},
- {"DALI_KEY_MEDIA",DALI_KEY_MEDIA},
- {"DALI_KEY_PLAY_PAUSE",DALI_KEY_PLAY_PAUSE},
- {"DALI_KEY_MUTE",DALI_KEY_MUTE},
- {"DALI_KEY_MENU",DALI_KEY_MENU},
{"DALI_KEY_HOME",DALI_KEY_HOME},
- {"DALI_KEY_HOMEPAGE",DALI_KEY_HOMEPAGE},
- {"DALI_KEY_WEBPAGE",DALI_KEY_WEBPAGE},
- {"DALI_KEY_MAIL",DALI_KEY_MAIL},
- {"DALI_KEY_SCREENSAVER",DALI_KEY_SCREENSAVER},
{"DALI_KEY_BRIGHTNESS_UP",DALI_KEY_BRIGHTNESS_UP},
{"DALI_KEY_BRIGHTNESS_DOWN",DALI_KEY_BRIGHTNESS_DOWN},
- {"DALI_KEY_SOFT_KBD",DALI_KEY_SOFT_KBD},
- {"DALI_KEY_QUICK_PANEL",DALI_KEY_QUICK_PANEL},
- {"DALI_KEY_TASK_SWITCH",DALI_KEY_TASK_SWITCH},
- {"DALI_KEY_APPS",DALI_KEY_APPS},
- {"DALI_KEY_SEARCH",DALI_KEY_SEARCH},
- {"DALI_KEY_VOICE",DALI_KEY_VOICE},
- {"DALI_KEY_LANGUAGE",DALI_KEY_LANGUAGE},
{"DALI_KEY_VOLUME_UP",DALI_KEY_VOLUME_UP},
{"DALI_KEY_VOLUME_DOWN",DALI_KEY_VOLUME_DOWN}
};
{
for ( std::size_t modeIndex = 0; modeIndex < KEY_MODE_COUNT; ++modeIndex )
{
- DALI_CHECK_FAIL( KeyGrab::GrabKey( gWindow, daliKeys[keyIndex].Key, daliKeyGrabModes[modeIndex].Mode ), "KeyGrab::GrabKey() is failed for Key=" +daliKeys[keyIndex].KeyName +" Mode="+ daliKeyGrabModes[modeIndex].ModeName );
+ DALI_CHECK_FAIL( KeyGrab::GrabKey( gWindow, daliKeys[keyIndex].Key, daliKeyGrabModes[modeIndex].Mode ) != true, "KeyGrab::GrabKey() is failed for Key=" +daliKeys[keyIndex].KeyName +" Mode="+ daliKeyGrabModes[modeIndex].ModeName );
}
}
DaliLog::PrintPass();
{
for ( std::size_t modeIndex = 0; modeIndex < KEY_MODE_COUNT; ++modeIndex )
{
- DALI_CHECK_FAIL( KeyGrab::GrabKey( gWindow, daliKeys[keyIndex].Key, daliKeyGrabModes[modeIndex].Mode ), "KeyGrab::GrabKey() is failed for Key=" +daliKeys[keyIndex].KeyName +" Mode=" +daliKeyGrabModes[modeIndex].ModeName );
- DALI_CHECK_FAIL( KeyGrab::UngrabKey( gWindow, daliKeys[keyIndex].Key ), "KeyGrab::UngrabKey() is failed for Key=" +daliKeys[keyIndex].KeyName );
+ DALI_CHECK_FAIL( KeyGrab::GrabKey( gWindow, daliKeys[keyIndex].Key, daliKeyGrabModes[modeIndex].Mode ) != true, "KeyGrab::GrabKey() is failed for Key=" +daliKeys[keyIndex].KeyName +" Mode=" +daliKeyGrabModes[modeIndex].ModeName );
+ DALI_CHECK_FAIL( KeyGrab::UngrabKey( gWindow, daliKeys[keyIndex].Key ) != true, "KeyGrab::UngrabKey() is failed for Key=" +daliKeys[keyIndex].KeyName );
}
}
DaliLog::PrintPass();
for ( std::size_t keyIndex = 0; keyIndex < KEY_COUNT; ++keyIndex )
{
//LOG_I("KeyGrabGrabKeyTopmost");
- DALI_CHECK_FAIL( KeyGrab::GrabKeyTopmost( gWindow, daliKeys[keyIndex].Key ), "KeyGrab::GrabKeyTopmost() is failed for Key="+ daliKeys[keyIndex].KeyName );
+ DALI_CHECK_FAIL( KeyGrab::GrabKeyTopmost( gWindow, daliKeys[keyIndex].Key ) != true, "KeyGrab::GrabKeyTopmost() is failed for Key="+ daliKeys[keyIndex].KeyName );
}
DaliLog::PrintPass();
}
for ( std::size_t keyIndex = 0; keyIndex < KEY_COUNT; ++keyIndex )
{
//LOG_I("KeyGrabUngrabKeyTopmost");
- DALI_CHECK_FAIL( KeyGrab::GrabKeyTopmost( gWindow, daliKeys[keyIndex].Key ), "KeyGrab::GrabKeyTopmost() is failed for Key=" +daliKeys[keyIndex].KeyName );
- DALI_CHECK_FAIL( KeyGrab::UngrabKeyTopmost( gWindow, daliKeys[keyIndex].Key ), "KeyGrab::UngrabKeyTopmost is failed for Key=" +daliKeys[keyIndex].KeyName );
+ DALI_CHECK_FAIL( KeyGrab::GrabKeyTopmost( gWindow, daliKeys[keyIndex].Key ) != true, "KeyGrab::GrabKeyTopmost() is failed for Key=" +daliKeys[keyIndex].KeyName );
+ DALI_CHECK_FAIL( KeyGrab::UngrabKeyTopmost( gWindow, daliKeys[keyIndex].Key ) != true, "KeyGrab::UngrabKeyTopmost is failed for Key=" +daliKeys[keyIndex].KeyName );
}
DaliLog::PrintPass();
}