From 2a47586403f89a51e7f7bda53d13ca3c68f4dc43 Mon Sep 17 00:00:00 2001 From: Malini Das Date: Tue, 1 May 2012 12:37:34 -0700 Subject: [PATCH] Bug 750553 - Rename getAttributeValue to getElementAttribute, r=jgriffin, a=testonly, npotb --- testing/marionette/atoms/atoms.js | 4 ++-- testing/marionette/client/marionette/marionette.py | 2 +- testing/marionette/marionette-actors.js | 8 ++++---- testing/marionette/marionette-listener.js | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/testing/marionette/atoms/atoms.js b/testing/marionette/atoms/atoms.js index f09d9c04cf94..406851dfc08b 100644 --- a/testing/marionette/atoms/atoms.js +++ b/testing/marionette/atoms/atoms.js @@ -150,8 +150,8 @@ function Z(a,b,c){a.va=i;return Rb(a,b,a.A,pd(a,b),c,h)}function pd(a,b){if(!(b (b=zb(a),b=new C(b.width/2,b.height/2));c=c||new od;c.move(a,b);c.z!==k&&g(new y(13,"Cannot press more then one button or an already pressed button."));c.z=0;c.ha=c.m();!qb()&&(P(c.m(),"OPTION")||P(c.m(),"SELECT"))?a=i:(a=E(c.m()).activeElement,a=(b=Z(c,lc))&&a!=E(c.m()).activeElement?l:b);if(a&&(a=c.ba||c.l,b=E(a).activeElement,a!=b)){if(b&&u(b.blur))try{b.blur()}catch(B){g(B)}u(a.focus)&&a.focus()}c.z===k&&g(new y(13,"Cannot release a button when no button is pressed."));Z(c,nc);if(0==c.z&&c.m()== c.ha){b=c.A;d=pd(c,ic);if(Ob(c.l,i)&&Hb(c.l)){a=k;if(Yb)for(e=c.l;e;e=e.parentNode)if(P(e,"A")){a=e;break}else{a:{if(P(e,"INPUT")&&(f=e.type.toLowerCase(),"submit"==f||"image"==f)){f=i;break a}if(P(e,"BUTTON")&&(f=e.type.toLowerCase(),"submit"==f)){f=i;break a}f=l}if(f)break}if(e=Bb(c.l)){e=c.l;Bb(e)||g(new y(15,"Element is not selectable"));f="selected";m=e.type&&e.type.toLowerCase();if("checkbox"==m||"radio"==m)f="checked";e=!!Eb(e,f)}if(c.ba&&(f=c.ba,!e||f.multiple))c.l.selected=!e,Ub(f,hc);Rb(c, ic,b,d)&&a&&ac(a)&&(b=a.href,d=G(E(a)),a.target?d.open(b,a.target):d.location.href=b)}c.Z&&Z(c,kc);c.Z=!c.Z}else 2==c.z&&Z(c,jc);c.z=k;c.ha=k}var ud=["_"],$=q;!(ud[0]in $)&&$.execScript&&$.execScript("var "+ud[0]);for(var wd;ud.length&&(wd=ud.shift());)!ud.length&&r(td)?$[wd]=td:$=$[wd]?$[wd]:$[wd]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);} -//getAttributeValue -var getAttributeValue = function(){return function(){var f=null,g=!1,h=this; +//getElementAttribute +var getElementAttribute = function(){return function(){var f=null,g=!1,h=this; function i(a){var c=typeof a;if("object"==c)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return c;var b=Object.prototype.toString.call(a);if("[object Window]"==b)return"object";if("[object Array]"==b||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==b||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"== c&&"undefined"==typeof a.call)return"object";return c}function j(a,c){function b(){}b.prototype=c.prototype;a.f=c.prototype;a.prototype=new b};function k(a,c){for(var b=1;b