summaryrefslogtreecommitdiff
path: root/tests/popup_test.cpp
diff options
context:
space:
mode:
authorJanusz Kozerski <j.kozerski@samsung.com>2015-09-25 14:47:34 +0200
committerJanusz Kozerski <j.kozerski@samsung.com>2015-11-10 11:43:34 +0100
commit473de0fb27052aff62e4b391feb1b6447f83ec41 (patch)
treed8e7ddf77eb3e3424394fd0529b004a77dfd6b77 /tests/popup_test.cpp
parent7871c1f106e6c11503b4a2a6f7bbbd876d2ec1fc (diff)
downloadcert-checker-473de0fb27052aff62e4b391feb1b6447f83ec41.tar.gz
cert-checker-473de0fb27052aff62e4b391feb1b6447f83ec41.tar.bz2
cert-checker-473de0fb27052aff62e4b391feb1b6447f83ec41.zip
Add popup
Since Notification framework doesn't support system daemons, the cert-checker's internal popup should be provided. Add implementation of popup binary - /usr/bin/cert-checker-popup Cert-checker forks(), execs a popup binary, waits for popup termination, and then reads user response from pipe. Change-Id: Ie2e70f661feb1f262841d59a1b4c6a7ec49901f9
Diffstat (limited to 'tests/popup_test.cpp')
-rw-r--r--tests/popup_test.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/popup_test.cpp b/tests/popup_test.cpp
index e2e1e3d..d08747e 100644
--- a/tests/popup_test.cpp
+++ b/tests/popup_test.cpp
@@ -25,13 +25,19 @@
using namespace CCHECKER;
-int main(void)
+int main(int argc, char** argv)
{
- LogDebug("Cert-checker start!");
+ LogDebug("Cert-checker popup-test start!");
+
+ int timeout = 60;
+ if (argc > 1) {
+ timeout = atoi(argv[1]);
+ }
+ LogDebug("popup-test timeout: " << timeout);
setlocale(LC_ALL, "");
- UI::UIBackend ui(20); // timeout 20 seconds
+ UI::UIBackend ui(timeout);
app_t app(std::string("test_APP_ID"),
std::string("test PKG ID"),
@@ -40,6 +46,6 @@ int main(void)
ui.call_popup(app);
- LogDebug("Cert-checker exit!");
+ LogDebug("Cert-checker popup-test exit!");
return 0;
}