[Erp5-report] r23929 - /erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Oct 1 14:25:33 CEST 2008


Author: fabien
Date: Wed Oct  1 14:25:23 2008
New Revision: 23929

URL: http://svn.erp5.org?rev=23929&view=rev
Log:
make prefs.js dinamic. This is made to be able to test file upload in zelenium tests : url have to be dinamic

Modified:
    erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py

Modified: erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py?rev=23929&r1=23928&r2=23929&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py (original)
+++ erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py Wed Oct  1 14:25:23 2008
@@ -138,9 +138,42 @@
 def prepareFirefox():
   os.system("rm -rf %s" % profile_dir)
   os.mkdir(profile_dir)
-  pref = file(os.path.join(os.path.dirname(__file__), 'prefs.js')).read()
+  prefs_js = """
+// Don't ask if we want to switch default browsers
+user_pref("browser.shell.checkDefaultBrowser", false);
+
+// Disable pop-up blocking
+user_pref("browser.allowpopups", true);
+user_pref("dom.disable_open_during_load", false);
+
+// Configure us as the local proxy
+//user_pref("network.proxy.type", 2);
+
+// Disable security warnings
+user_pref("security.warn_submit_insecure", false);
+user_pref("security.warn_submit_insecure.show_once", false);
+user_pref("security.warn_entering_secure", false);
+user_pref("security.warn_entering_secure.show_once", false);
+user_pref("security.warn_entering_weak", false);
+user_pref("security.warn_entering_weak.show_once", false);
+user_pref("security.warn_leaving_secure", false);
+user_pref("security.warn_leaving_secure.show_once", false);
+user_pref("security.warn_viewing_mixed", false);
+user_pref("security.warn_viewing_mixed.show_once", false);
+
+// Disable "do you want to remember this password?"
+user_pref("signon.rememberSignons", false);
+
+// this is required to upload files
+user_pref("capability.principal.codebase.p1.id", %s);
+user_pref("capability.principal.codebase.p1.subjectName", "");
+user_pref("signed.applets.codebase_principal_support", true);""" % \
+    '%s:%s' % (host, port)
+  
+#  pref = file(os.path.join(os.path.dirname(__file__), 'prefs.js')).read()
+ 
   pref_file = open(os.path.join(profile_dir, 'prefs.js'), 'w')
-  pref_file.write(pref)
+  pref_file.write(prefs_js)
   pref_file.close()
 
 def runFirefox():




More information about the Erp5-report mailing list