mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Backed out changeset 04a18f29f774 (bug 1087038) for marionette test failures
This commit is contained in:
parent
aaa297f259
commit
babd3696e8
@ -293,11 +293,7 @@ ElementManager.prototype = {
|
||||
}
|
||||
let found = all ? this.findElements(values.using, values.value, win.document, startNode) :
|
||||
this.findElement(values.using, values.value, win.document, startNode);
|
||||
let type = Object.prototype.toString.call(found);
|
||||
let isArrayLike = ((type == '[object Array]') || (type == '[object HTMLCollection]') || (type == '[object NodeList]'));
|
||||
if (found == null || (isArrayLike && found.length <= 0)) {
|
||||
throw new Error(found + ', ' + type + ', ' + isArrayLike + ', ' + values.value);
|
||||
|
||||
if (found == null || found.length <= 0) {
|
||||
if (!searchTimeout || new Date().getTime() - startTime > searchTimeout) {
|
||||
if (all) {
|
||||
on_success([], command_id); // findElements should return empty list
|
||||
@ -314,7 +310,8 @@ throw new Error(found + ', ' + type + ', ' + isArrayLike + ', ' + values.value);
|
||||
Components.interfaces.nsITimer.TYPE_ONE_SHOT);
|
||||
}
|
||||
} else {
|
||||
if (isArrayLike) {
|
||||
let type = Object.prototype.toString.call(found);
|
||||
if ((type == '[object Array]') || (type == '[object HTMLCollection]') || (type == '[object NodeList]')) {
|
||||
let ids = []
|
||||
for (let i = 0 ; i < found.length ; i++) {
|
||||
ids.push(this.addToKnownElements(found[i]));
|
||||
|
Loading…
Reference in New Issue
Block a user