Bug 1277090: Have Marionette return only attributes from getElementAttribute. r=ato

Using the Selenium atom we are conflating properties and attributes which is not
thing we really want to be doing.

MozReview-Commit-ID: HdZOz1jQrwz

--HG--
extra : rebase_source : 70118dba39bb1a72e78a264d2a71beff3671f9cb
This commit is contained in:
David Burns 2016-05-31 23:23:05 +01:00
parent a5625a56b5
commit 186ffe49b4

View File

@ -1786,7 +1786,16 @@ GeckoDriver.prototype.getElementAttribute = function*(cmd, resp) {
case Context.CHROME:
let win = this.getCurrentWindow();
let el = this.curBrowser.seenEls.get(id, {frame: win});
resp.body.value = atom.getElementAttribute(el, name, this.getCurrentWindow());
if (element.isBooleanAttribute(el, name)) {
if (el.hasAttribute(name)) {
resp.body.value = "true";
} else {
resp.body.value = null;
}
} else {
resp.body.value = el.getAttribute(name);
}
break;
case Context.CONTENT: