Commit 60aeacd2 authored by Fabien Morin's avatar Fabien Morin

make prefs.js dinamic. This is made to be able to test file upload in zelenium...

make prefs.js dinamic. This is made to be able to test file upload in zelenium tests : url have to be dinamic


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23929 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ecd04fb0
......@@ -138,9 +138,42 @@ def runXvfb():
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():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment