Bug 1404277 - Retrieve namespaceURI as property and not attribute. r=ato

With newer Selenium atoms which do not conflate attributes and
properties, the retrieval via getElementAttribute will fail. By
retrieving it directly as property will fix it.

MozReview-Commit-ID: CFy3JZDeUWq

--HG--
extra : rebase_source : ed3a358f52b7cd54f3c5dda037fddaa93173e3b6
This commit is contained in:
Henrik Skupin 2017-09-29 12:54:03 +02:00
Родитель bafd3b292e
Коммит c5802a3204
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -25,7 +25,9 @@ const logger = Log.repository.getLogger("Marionette");
this.EXPORTED_SYMBOLS = ["element"];
const DOCUMENT_POSITION_DISCONNECTED = 1;
const XMLNS = "http://www.w3.org/1999/xhtml";
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const uuidGen = Cc["@mozilla.org/uuid-generator;1"]
.getService(Ci.nsIUUIDGenerator);
@ -946,8 +948,7 @@ element.scrollIntoView = function(el) {
};
element.isXULElement = function(el) {
let ns = atom.getElementAttribute(el, "namespaceURI");
return ns.indexOf("there.is.only.xul") >= 0;
return el.namespaceURI === XULNS;
};
const boolEls = {