From: Feng Gang Date: Thu, 15 Aug 2013 06:03:15 +0000 (-0700) Subject: Fixed bug TTS-1854 to add confirm infos. X-Git-Tag: 2.2.1_release~93 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4dfbe031ed85a0e598f1f563a8204769ae8a29a0;p=test%2Ftct%2Fweb%2Fbehavior.git Fixed bug TTS-1854 to add confirm infos. Change-Id: I131653a2bb0cad2db997071846fce235f8a0cfbf Signed-off-by: Feng Gang --- diff --git a/tests/CSP/js/main.js b/tests/CSP/js/main.js index 1608fa6..cc5786e 100644 --- a/tests/CSP/js/main.js +++ b/tests/CSP/js/main.js @@ -133,4 +133,20 @@ function initTests() { }, false); } +function backAppsHome() { + if (confirm("Back to main menu will lost the sub result in this page, continue?")) { + window.close(); + } +} + +function successBackAppsHome() { + window.close(); +} + +function reportResult(res) { + var jsonStr="[{\"testname\":\""+getAppName()+"\",\"result\":\""+res+"\"}]"; + window.opener.postMessage(jsonStr, '*'); + successBackAppsHome(); +} + window.addEventListener('load', initTests, false); diff --git a/tests/ConfigurationExtension/js/main.js b/tests/ConfigurationExtension/js/main.js index c2a0433..c1cf2da 100644 --- a/tests/ConfigurationExtension/js/main.js +++ b/tests/ConfigurationExtension/js/main.js @@ -131,4 +131,20 @@ function initTests() { }, false); } +function backAppsHome() { + if (confirm("Back to main menu will lost the sub result in this page, continue?")) { + window.close(); + } +} + +function successBackAppsHome() { + window.close(); +} + +function reportResult(res) { + var jsonStr="[{\"testname\":\""+getAppName()+"\",\"result\":\""+res+"\"}]"; + window.opener.postMessage(jsonStr, '*'); + successBackAppsHome(); +} + window.addEventListener('load', initTests, false); diff --git a/tests/PackageManagement/js/main.js b/tests/PackageManagement/js/main.js index 247a5d1..53478ad 100644 --- a/tests/PackageManagement/js/main.js +++ b/tests/PackageManagement/js/main.js @@ -124,4 +124,20 @@ function initTests() { }, false); } +function backAppsHome() { + if (confirm("Back to main menu will lost the sub result in this page, continue?")) { + window.close(); + } +} + +function successBackAppsHome() { + window.close(); +} + +function reportResult(res) { + var jsonStr="[{\"testname\":\""+getAppName()+"\",\"result\":\""+res+"\"}]"; + window.opener.postMessage(jsonStr, '*'); + successBackAppsHome(); +} + window.addEventListener('load', initTests, false); diff --git a/tests/Stability/js/main.js b/tests/Stability/js/main.js index d727f7c..04bbfc6 100644 --- a/tests/Stability/js/main.js +++ b/tests/Stability/js/main.js @@ -117,4 +117,20 @@ function initTests() { }, false); } +function backAppsHome() { + if (confirm("Back to main menu will lost the sub result in this page, continue?")) { + window.close(); + } +} + +function successBackAppsHome() { + window.close(); +} + +function reportResult(res) { + var jsonStr="[{\"testname\":\""+getAppName()+"\",\"result\":\""+res+"\"}]"; + window.opener.postMessage(jsonStr, '*'); + successBackAppsHome(); +} + window.addEventListener('load', initTests, false); diff --git a/tests/WRTSupport/js/main.js b/tests/WRTSupport/js/main.js index ab0a9af..3fe2cbc 100644 --- a/tests/WRTSupport/js/main.js +++ b/tests/WRTSupport/js/main.js @@ -126,4 +126,20 @@ function initTests() { }, false); } +function backAppsHome() { + if (confirm("Back to main menu will lost the sub result in this page, continue?")) { + window.close(); + } +} + +function successBackAppsHome() { + window.close(); +} + +function reportResult(res) { + var jsonStr="[{\"testname\":\""+getAppName()+"\",\"result\":\""+res+"\"}]"; + window.opener.postMessage(jsonStr, '*'); + successBackAppsHome(); +} + window.addEventListener('load', initTests, false); diff --git a/tests/WRTUI/js/main.js b/tests/WRTUI/js/main.js index 6708042..3d9fed2 100644 --- a/tests/WRTUI/js/main.js +++ b/tests/WRTUI/js/main.js @@ -119,4 +119,20 @@ function initTests() { }, false); } +function backAppsHome() { + if (confirm("Back to main menu will lost the sub result in this page, continue?")) { + window.close(); + } +} + +function successBackAppsHome() { + window.close(); +} + +function reportResult(res) { + var jsonStr="[{\"testname\":\""+getAppName()+"\",\"result\":\""+res+"\"}]"; + window.opener.postMessage(jsonStr, '*'); + successBackAppsHome(); +} + window.addEventListener('load', initTests, false);