Commit c4d9bbac authored by Jérome Perrin's avatar Jérome Perrin

ui_test_core/selenium: undo patches on doType

This was for very old firefox and have been ineffective for years.

This reverts part of 2fcab04e , which for some reason was patching
doType that was not used because defined in user-extensions.
parent 0cfb2dbe
...@@ -80,19 +80,6 @@ Selenium.prototype.assertPortalStatusMessage = function(text) { ...@@ -80,19 +80,6 @@ Selenium.prototype.assertPortalStatusMessage = function(text) {
Assert.matches(text, actualValue); Assert.matches(text, actualValue);
}; };
Selenium.prototype.doType = function(locator, newText) {
if (typeof(netscape) != "undefined" && typeof(netscape.security.PrivilegeManager) != "undefined" ) {
// On old firefox versions, we enable privilege to upload file in javascript.
// The user needs to have signed.applets.codebase_principal_support set to true in about:config
// This is done in prefs.js generated by product/ERP5Type/tests/runFunctionalTest.py
// This approach no longer work in newer firefox versions https://developer.mozilla.org/en-US/docs/Bypassing_Security_Restrictions_and_Signing_Code
// Without this, tests dealing with file upload will fail
netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");
}
var element = this.page().findElement(locator);
this.page().replaceText(element, newText);
};
/* /*
* Get the location of the current page. This function is missing in * Get the location of the current page. This function is missing in
* Selenium 0.8 or later. * Selenium 0.8 or later.
......
...@@ -741,7 +741,6 @@ Selenium.prototype.doType = function(locator, value) { ...@@ -741,7 +741,6 @@ Selenium.prototype.doType = function(locator, value) {
* @param locator an <a href="#locators">element locator</a> * @param locator an <a href="#locators">element locator</a>
* @param value the value to type * @param value the value to type
*/ */
netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");
if (this.browserbot.controlKeyDown || this.browserbot.altKeyDown || this.browserbot.metaKeyDown) { if (this.browserbot.controlKeyDown || this.browserbot.altKeyDown || this.browserbot.metaKeyDown) {
throw new SeleniumError("type not supported immediately after call to controlKeyDown() or altKeyDown() or metaKeyDown()"); throw new SeleniumError("type not supported immediately after call to controlKeyDown() or altKeyDown() or metaKeyDown()");
} }
......
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