[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [fpcentral/master] Bug 22587: add support for the automated_test argument



commit a27e401cc0995cd0205c8e995b0d370167cadf6e
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
Date:   Sun Jan 28 19:53:38 2018 +0100

    Bug 22587: add support for the automated_test argument
    
    If the /fp URL contains an `automated_test` argument, don't wait for
    the user to click the buttons to start the tests, but run them directly.
    This makes it easier to integrate fpcentral into our testsuite.
---
 static/js/clientAPI.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/static/js/clientAPI.js b/static/js/clientAPI.js
index bf10164..498275d 100644
--- a/static/js/clientAPI.js
+++ b/static/js/clientAPI.js
@@ -178,6 +178,12 @@ $(document).ready(function() {
         localStorage.removeItem(sendTemp);
         localStorage.removeItem(statsTemp);
     }
+
+    if (window.location.search.indexOf("automated_test") > -1) {
+        api.run();
+        api.send();
+        api.getNumberFP();
+    }
 });
 
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits