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

boklm at torproject.org boklm at torproject.org
Sun Jan 28 20:00:46 UTC 2018


commit a27e401cc0995cd0205c8e995b0d370167cadf6e
Author: Nicolas Vigier <boklm at torproject.org>
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();
+    }
 });
 
 



More information about the tbb-commits mailing list