Fixed bug TTS-1854 to add confirm infos.
authorFeng Gang <gangx.feng@intel.com>
Thu, 15 Aug 2013 06:03:15 +0000 (23:03 -0700)
committerFeng Gang <gangx.feng@intel.com>
Thu, 15 Aug 2013 06:03:15 +0000 (23:03 -0700)
Change-Id: I131653a2bb0cad2db997071846fce235f8a0cfbf
Signed-off-by: Feng Gang <gangx.feng@intel.com>
tests/CSP/js/main.js
tests/ConfigurationExtension/js/main.js
tests/PackageManagement/js/main.js
tests/Stability/js/main.js
tests/WRTSupport/js/main.js
tests/WRTUI/js/main.js

index 1608fa605cc861879da32cc70e714972d92f3122..cc5786e29d8158db83e7c87aafdb74dc36d14fe3 100644 (file)
@@ -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);
index c2a04335aaa5c08c6dd4b020acd0ea18fce0891f..c1cf2da5ace8fb0826380326fa3bde9e89b1dc3c 100644 (file)
@@ -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);
index 247a5d14e16e885c78ef90fca22b1c6752aab427..53478ad8889f09c851de94c2a13894f71ddc0152 100644 (file)
@@ -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);
index d727f7c420019a1c3bf8364f3f0b0539553f2458..04bbfc6b9264ed637a09e8e9afb55333d3ea3b32 100644 (file)
@@ -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);
index ab0a9af3ccf5f8ec20933d89f5d504d1a3e93c19..3fe2cbca37e05054296e9bb96ae0e4c5684646e3 100644 (file)
@@ -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);
index 670804286d38fdfbbff513a0b19b2a125499dcbf..3d9fed233d798fcdebc50505a2894a314fc275f1 100644 (file)
@@ -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);