This repository has been archived by the owner on Dec 16, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added browser.windows.count, select and close(=last).
Also more progress towards testing FB Connect.
- Loading branch information
Showing
12 changed files
with
238 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 10 additions & 9 deletions
19
...replay/connect.facebook.net/1336003652912 → test/replay/connect.facebook.net/all.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
GET /connect/xd_arbiter.php?version=5 | ||
host: static.ak.facebook.com | ||
|
||
200 HTTP/1.1 | ||
content-type: text/html; charset=utf-8 | ||
x-fb-debug: H9QhM94bHoYsTo9xKaTqrsTic0q0PbczW70NVSyArTA= | ||
x-cnection: close | ||
cache-control: public, max-age=29817434 | ||
expires: Fri, 19 Apr 2013 00:13:14 GMT | ||
date: Tue, 08 May 2012 21:36:00 GMT | ||
content-length: 12805 | ||
connection: keep-alive | ||
|
||
<html><head></head><body><script>function bagofholding() {};(function(a){if(a.require)return;var b={},c={},d={},e=0,f=1,g=2,h='special',i='refcount',j='exports',k='dependencies',l='module',m='waiting',n='factory',o=undefined,p='define',q='global',r='require',s='requireLazy',t='requireDynamic',u='context',v=Object.prototype.hasOwnProperty;function w(ha){if(!b[ha]){var ia='Requiring unknown module "'+ha+'"';throw new Error(ia);}var ja=b[ha],ka,la,ma;if(ja[m]&&ja[h]&g)z();if(ja[m]){ma='Requiring module "'+ha+'" with unresolved dependencies';throw new Error(ma);}if(!ja[j]){var na=ja[j]={},oa=ja[n];if(Object.prototype.toString.call(oa)==='[object Function]'){var pa=[],qa=ja[k],ra=qa.length;if(ja[h]&g)ra=Math.min(ra,oa.length);for(la=0;la<ra;la++){ka=qa[la];pa.push(ka===l?ja:(ka===j?na:w(ka)));}var sa=oa.apply(ja[u]||a,pa);if(sa)ja[j]=sa;}else ja[j]=oa;}if(ja[i]--===1)delete b[ha];return ja[j];}function x(ha,ia,ja,ka,la,ma){if(ia===o){ia=[];ja=ha;ha=ba();}else if(ja===o){ja=ia;ia=ha;ha=ba();}var na=b[ha];if(na){if(ma)na[i]+=ma;return;}else if(!ia&&!ja&&ma){d[ha]=(d[ha]||0)+ma;return;}else{na={id:ha};na[i]=(d[ha]||0)+(ma||0);delete d[ha];}na[n]=ja;na[k]=ia;na[u]=la;na[h]=ka;b[ha]=na;ca(ha);}function y(ha,ia,ja){x(ha,ia,o,f,ja,1);}function z(){var ha={},ia;for(ia in c)if(v.call(c,ia))if(b[ia]&&!ha[ia]&&b[ia][h]&g)aa({},ia,ha);}function aa(ha,ia,ja){ja[ia]=1;var ka=c[ia],la;if(!ka)return;ha[ia]=1;for(la in ka)if(v.call(ka,la)){if(!b[la][h]&g)continue;if(ha[la]){delete ka[la];b[la][m]--;if(!b[la][m])da(la);}else aa(ha,la,ja);}ha[ia]=0;}function ba(){return '__mod__'+e++;}function ca(ha){var ia=b[ha],ja=0;for(var ka=0;ka<ia[k].length;ka++){var la=ia[k][ka];if(!b[la]||b[la][m]){c[la]||(c[la]={});if(!c[la][ha])ja++;c[la][ha]=1;}}ia[m]=ja;if(!ja)da(ha);}function da(ha){var ia=b[ha];if(ia[h]&f)w(ha);var ja=c[ha];if(ja){delete c[ha];for(var ka in ja)if(v.call(ja,ka))if(!--b[ka][m])da(ka);}}function ea(ha,ia){b[ha]={id:ha};b[ha][j]=ia;}ea(l,0);ea(j,0);ea(p,x);ea(q,a);ea(r,w);ea(t,w);ea(s,y);x.amd={};a[p]=x;a[r]=w;a[t]=w;a[s]=y;var fa=false,ga=function(ha,ia,ja,ka){x(ha,ia,ja,ka||g);if(b[ha][m]&&!fa)fa=setTimeout(function(){z();fa=false;},9);};a.__d=function(ha,ia,ja,ka){ia=[q,r,t,s,l,j].concat(ia);ga(ha,ia,ja,ka);};a.__e=a.__d;})(this); | ||
__d("XDMConfig",[],{"Flash":{"path":"https:\/\/s-static.ak.fbcdn.net\/rsrc.php\/v1\/ys\/r\/WON-TVLCpDP.swf"}});__d("initXdArbiter",["QueryString","resolveWindow","Log","XDM","XDMConfig"],function(a,b,c,d,e,f){var g=b('QueryString'),h=b('resolveWindow'),i=b('Log'),j=b('XDM'),k=c('XDMConfig'),l=location.protocol.replace(':',''),m=/#(.*)|$/.exec(location.href)[1];if(!m){i.error('xd_arbiter.php loaded without a valid hash, referrer: %s',document.referrer);return;}var n=g.decode(m);function o(y){return y.replace(/["'<>\(\)\\]/g,'');}function p(){if(window!=parent&&window.parent!=window.parent.parent)try{return parent.parent.XdArbiter.register(window);}catch(y){i.error('Could not register with XdArbiter in parent.parent');}return '';}function q(y,z){if(!y||y.length===0)return true;var aa='.'+(/https?:\/\/(.*)$/).exec(z)[1],ba=y.length;while(ba--){var ca='.'+y[ba];if(ca==aa.substring(aa.length-ca.length))return true;}i.error('Failed proxying to %s, expected %s',aa,y.toString());return false;}function r(y,z){var aa=y?h(y):parent.parent;try{aa.XdArbiter.handleMessage(z);}catch(ba){i.error('Could not reach www.facebook.com using %s',y);return;}}function s(){try{h(n.relation).frames['fb_xdm_frame_'+l].proxyMessage(m);}catch(y){setTimeout(s,50);}}function t(){var y=/^(.*)\/(.*)$/.exec(n.origin)[1];if(window.__fbNative&&window.__fbNative.postMessage){__fbNative.postMessage(m,y);}else{var z=function(aa){window.removeEventListener('fbNativeReady',z);__fbNative.postMessage(m,y);};window.addEventListener('fbNativeReady',z);}}document.domain='facebook.com';if(n.xd_rel){r(n.xd_rel,n);return;}else if(n.relation){if(window===top&&/FBAN\/\w+;/i.test(navigator.userAgent)){i.info('Native proxy');t();}else{i.info('Legacy proxy to %s',n.relation);s();}return;}if(l!=/https?/.exec(window.name)[0]){i.info('Redirection to %s detected, aborting',l);return;}var u=o(n.transport),v=o(n.channel),w=o(n.channel_path),x=o(n.origin);if(!/^https?/.test(x)){i.error('Invalid origin presented, aborting.');return;}j.create({root:document.body,transport:u,channel:v+'_'+l,channelPath:w,flashUrl:k.Flash.path,onMessage:function(y,z){y=g.decode(y);r(y.relation,y);},whenReady:function(y){window.proxyMessage=function(ca,da){if(q(da,x))y.send(ca,x,parent,v);};var z=null,aa={xd_action:'proxy_ready',data:z},ba=p();if(ba)aa.registered=ba;y.send(g.encode(aa),x,parent,v);}});}); | ||
__d("QueryString",[],function(a,b,c,d,e,f){var g={encode:function(h){var i=[];for(var j in h)if(h.hasOwnProperty(j))i.push(encodeURIComponent(j)+'='+encodeURIComponent(h[j]));return i.join('&');},decode:function(h){var i=h.split('&'),j=i.length,k={};while(j--){var l=i[j].split('=',2);k[decodeURIComponent(l[0])]=decodeURIComponent(l[1]);}return k;}};e.exports=g;}); | ||
__d("resolveWindow",[],function(a,b,c,d,e,f){function g(h){var i=window,j=h.split('.');try{for(var l=0;l<j.length;l++){var m=j[l],n=/^frames\[['"]?([a-zA-Z0-9\-_]+)['"]?\]$/.exec(m);if(n){i=i.frames[n[1]];}else if(m==='opener'||m==='parent'||m==='top'){i=i[m];}else return null;}}catch(k){return null;}return i;}e.exports=g;}); | ||
__d("Log",["sprintf"],function(a,b,c,d,e,f){var g=b("sprintf"),h=Array.prototype.slice,i={DEBUG:3,INFO:2,WARNING:1,ERROR:0};function j(l,m,n){var o=g.apply(null,n);if(k.level>=l&&window.console)console[m in console?m:'log'](o);}var k={level:-1,Level:i,debug:function(){j(i.DEBUG,'debug',h.call(arguments));},info:function(){j(i.INFO,'info',h.call(arguments));},warn:function(){j(i.WARNING,'warn',h.call(arguments));},error:function(){j(i.ERROR,'error',h.call(arguments));}};e.exports=k;}); | ||
__d("sprintf",[],function(a,b,c,d,e,f){function g(h,i){i=Array.prototype.slice.call(arguments,1);var j=0;return h.replace(/%s/g,function(k){return i[j++];});}e.exports=g;}); | ||
__d("XDM",["Flash","DOMEventListener","Log","guid","copyProperties"],function(a,b,c,d,e,f){var g=b('Flash'),h=b('DOMEventListener'),i=b('Log'),j=b('guid'),k=b('copyProperties'),l={},m={transports:[]};function n(p){var q={},r=p.length,s=m.transports;while(r--)q[p[r]]=1;r=s.length;while(r--){var t=s[r],u=l[t];if(!q[t]&&u.isAvailable())return t;}}var o={register:function(p,q){i.debug('Registering %s as XDM provider',p);m.transports.push(p);l[p]=q;},create:function(p){if(!p.whenReady&&!p.onMessage){i.error('An instance without whenReady or onMessage makes no sense');throw new Error('An instance without whenReady or '+'onMessage makes no sense');}if(!p.channel){i.warn('Missing channel name, selecting at random');p.channel=j();}if(!p.whenReady)p.whenReady=bagofholding;if(!p.onMessage)p.onMessage=bagofholding;var q=p.transport||n(p.blacklist||[]),r=l[q];if(r&&r.isAvailable()){i.debug('%s is available',q);r.init(p);return q;}}};o.register('fragment',(function(){var p=false,q,r=location.protocol+'//'+location.host;function s(t){var u=document.createElement('iframe');u.src='javascript:false';var v=h.add(u,'load',function(){v.remove();setTimeout(function(){u.parentNode.removeChild(u);},5000);});q.appendChild(u);u.src=t;}return {isAvailable:function(){return true;},init:function(t){i.debug('init fragment');var u={send:function(v,w,x,y){i.debug('sending to: %s (%s)',w+t.channelPath,y);s(w+t.channelPath+v+'&xd_rel=parent.parent&relation=parent.parent&xd_origin='+encodeURIComponent(r));}};if(p){t.whenReady(u);return;}q=t.root;p=true;t.whenReady(u);}};})());o.register('flash',(function(){var p=false,q,r={},s=false;return {isAvailable:function(){return g.isAvailable();},init:function(t){i.debug('init flash: '+t.channel);var u={send:function(x,y,z,aa){i.debug('sending to: %s (%s)',y,aa);q.postMessage(x,y,aa);}};if(p){t.whenReady(u);return;}var v=t.root.appendChild(document.createElement('div')),w=j();r[w]=function(){i.info('xdm.swf called the callback');delete r[w];w=j();r[w]=function(x,y){x=decodeURIComponent(x);i.debug('received message %s from %s',x,y);t.onMessage(x,y);};q.init(t.channel,'FB_XDM_CALLBACKS.'+w);t.whenReady(u);};window.FB_XDM_CALLBACKS=r;q=g.embed(t.flashUrl,v,null,{protocol:location.protocol.replace(':',''),host:location.host,callback:'FB_XDM_CALLBACKS.'+w,log:s});p=true;}};})());o.register('postmessage',(function(){var p=false;return {isAvailable:function(){return !!window.postMessage;},init:function(q){i.debug('init postMessage: '+q.channel);var r='_FB_'+q.channel,s={send:function(t,u,v,w){if(window===v){i.error('Invalid windowref, equal to window (self)');throw new Error();}i.debug('sending to: %s (%s)',u,w);v.postMessage('_FB_'+w+t,u);}};if(p){q.whenReady(s);return;}h.add(window,'message',function(event){var t=event.data,u=event.origin||'native';if(typeof t!='string'){i.warn('Received message of type %s from %s, expected a string',typeof t,u);return;}i.debug('received message %s from %s',t,u);if(u!='native')if(t.substring(0,r.length)==r){t=t.substring(r.length);}else return;q.onMessage(t,u);});q.whenReady(s);p=true;}};})());e.exports=o;}); | ||
__d("Flash",["ua","copyProperties","QueryString","guid"],function(a,b,c,d,e,f){var g=b("ua"),h=b("copyProperties"),i=b("QueryString"),j=b("guid"),k={},l;function m(r){var s=document.getElementById(r);if(s)s.parentNode.removeChild(s);delete k[r];}function n(){for(var r in k)if(k.hasOwnProperty(r))m(r);}function o(r){return r.replace(/\d+/g,function(s){return '000'.substring(s.length)+s;});}function p(r){if(!l){if(g.ie()>=9)window.attachEvent('onunload',n);l=true;}k[r]=r;}var q={embed:function(r,s,t,u){var v=j();r=encodeURI(r);t=h({allowscriptaccess:'always',flashvars:u,movie:r},t||{});if(typeof t.flashvars=='object')t.flashvars=i.encode(t.flashvars);var w=[];for(var x in t)if(t.hasOwnProperty(x)&&t[x])w.push('<param name="'+encodeURI(x)+'" value="'+encodeURI(t[x])+'">');var y=document.createElement('div'),z='<object '+(g.ie()?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ':'type="application/x-shockwave-flash"')+'data="'+r+'" '+'id="'+v+'">'+w.join('')+'</object>';y.innerHTML=z;s.appendChild(y.firstChild);p(v);return s.firstChild;},remove:m,getVersion:function(){var r='Shockwave Flash',s='application/x-shockwave-flash',t='ShockwaveFlash.ShockwaveFlash',u;if(navigator.plugins&&typeof navigator.plugins[r]=='object'){var v=navigator.plugins[r].description;if(v&&navigator.mimeTypes&&navigator.mimeTypes[s]&&navigator.mimeTypes[s].enabledPlugin)u=v.match(/\d+/g);}if(!u)try{u=(new ActiveXObject(t)).GetVariable('$version').match(/(\d+),(\d+),(\d+),(\d+)/);u=Array.prototype.slice.call(u,1);}catch(w){}return u;},checkMinVersion:function(r){var s=q.getVersion();if(!s)return false;return o(s.join('.'))>=o(r);},isAvailable:function(){return !!q.getVersion();}};e.exports=q;}); | ||
__d("ua",[],function(a,b,c,d,e,f){var g=false,h,i,j,k,l,m,n,o,p,q;function r(){if(g)return;g=true;var t=navigator.userAgent,u=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))/.exec(t),v=/(Mac OS X)|(Windows)|(Linux)/.exec(t),w=/\b(iPhone|iP[ao]d)/.exec(t);p=!!(/Win64/.exec(t));if(u){h=u[1]?parseFloat(u[1]):NaN;if(h&&document.documentMode)h=document.documentMode;i=u[2]?parseFloat(u[2]):NaN;j=u[3]?parseFloat(u[3]):NaN;k=u[4]?parseFloat(u[4]):NaN;if(k){u=/(?:Chrome\/(\d+\.\d+))/.exec(t);l=u&&u[1]?parseFloat(u[1]):NaN;}else l=NaN;}else h=i=j=l=k=NaN;if(v){if(v[1]){var x=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);m=x?parseFloat(x[1].replace('_','.')):true;}else m=false;n=!!v[2];o=!!v[3];}else m=n=o=false;q=w;}var s={ie:function(){return r()||h;},ie64:function(){return s.ie()&&p;},firefox:function(){return r()||i;},opera:function(){return r()||j;},safari:function(){return r()||k;},chrome:function(){return r()||l;},windows:function(){return r()||n;},osx:function(){return r()||m;},linux:function(){return r()||o;},iphone:function(){return r()||q;}};a.ua=e.exports=s;},3); | ||
__d("copyProperties",[],function(a,b,c,d,e,f){function g(h,i){h=h||{};i=i||{};for(var j in i)h[j]=i[j];if(i.hasOwnProperty&&i.hasOwnProperty('toString')&&(typeof i.toString!='undefined')&&(h.toString!==i.toString))h.toString=i.toString;return h;}e.exports=g;}); | ||
__d("guid",[],function(a,b,c,d,e,f){function g(){return 'f'+(Math.random()*(1<<30)).toString(16).replace('.','');}e.exports=g;}); | ||
__d("DOMEventListener",[],function(a,b,c,d,e,f){var g,h;if(window.addEventListener){g=function(j,k,l){j.addEventListener(k,l,false);};h=function(j,k,l){j.removeEventListener(k,l,false);};}else if(window.attachEvent){g=function(j,k,l){j.attachEvent('on'+k,l);};h=function(j,k,l){j.detachEvent('on'+k,l);};}var i={add:function(j,k,l){g(j,k,l);return {remove:function(){h(j,k,l);j=null;}};},remove:h};e.exports=i;}); | ||
require("initXdArbiter");</script></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
GET REGEXP /\/dialog\/oauth\?api_key/ | ||
host: www.facebook.com | ||
|
||
302 HTTP/1.1 | ||
cache-control: private, no-cache, no-store, must-revalidate | ||
expires: Sat, 01 Jan 2000 00:00:00 GMT | ||
location: http://static.ak.facebook.com/connect/xd_arbiter.php?version=5#cb=f35030b504&origin=http%3A%2F%2Flocalhost%3A3003%2Ffccde47a8&domain=localhost&relation=parent&frame=f3db1a134&error=unknown_user | ||
pragma: no-cache | ||
x-content-type-options: nosniff | ||
x-xss-protection: 0 | ||
content-type: text/html; charset=utf-8 | ||
x-fb-debug: EMkCyzfEdkh9WUw+V6s/np50CRjVagIxV77JRQRP0kE= | ||
date: Tue, 08 May 2012 21:36:01 GMT | ||
content-length: 0 | ||
connection: keep-alive | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
GET REGEXP /\/dialog\/oauth\?api_key/ | ||
GET REGEXP /\/dialog\/oauth\?api_key=/ | ||
host: www.facebook.com | ||
|
||
302 HTTP/1.1 | ||
cache-control: private, no-cache, no-store, must-revalidate | ||
expires: Sat, 01 Jan 2000 00:00:00 GMT | ||
location: https://www.facebook.com/login.php?api_key=190950381025985&skip_api_login=1&display=popup&cancel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D5%26error_reason%3Duser_denied%26error%3Daccess_denied%26error_description%3DThe%2Buser%2Bdenied%2Byour%2Brequest.%23cb%3Df15395d424%26origin%3Dhttp%253A%252F%252Flocalhost%253A3003%252Ff13f2cb314%26domain%3Dlocalhost%26relation%3Dopener%26frame%3Df31ab5c58&fbconnect=1&next=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Fpermissions.request%3F_path%3Dpermissions.request%26app_id%3D190950381025985%26redirect_uri%3Dhttp%253A%252F%252Fstatic.ak.facebook.com%252Fconnect%252Fxd_arbiter.php%253Fversion%253D5%2523cb%253Df15395d424%2526origin%253Dhttp%25253A%25252F%25252Flocalhost%25253A3003%25252Ff13f2cb314%2526domain%253Dlocalhost%2526relation%253Dopener%2526frame%253Df31ab5c58%26sdk%3Djoey%26display%3Dpopup%26response_type%3Dtoken%252Csigned_request%26domain%3Dlocalhost%26fbconnect%3D1%26from_login%3D1%26client_id%3D190950381025985&rcount=1 | ||
location: https://www.facebook.com/login.php?api_key=190950381025985&skip_api_login=1&display=popup&cancel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D5%26error_reason%3Duser_denied%26error%3Daccess_denied%26error_description%3DThe%2Buser%2Bdenied%2Byour%2Brequest.%23cb%3Df42febd2c%26origin%3Dhttp%253A%252F%252Flocalhost%253A3003%252Ff2b184213c%26domain%3Dlocalhost%26relation%3Dopener%26frame%3Df2f923f494&fbconnect=1&next=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Fpermissions.request%3F_path%3Dpermissions.request%26app_id%3D190950381025985%26redirect_uri%3Dhttp%253A%252F%252Fstatic.ak.facebook.com%252Fconnect%252Fxd_arbiter.php%253Fversion%253D5%2523cb%253Df42febd2c%2526origin%253Dhttp%25253A%25252F%25252Flocalhost%25253A3003%25252Ff2b184213c%2526domain%253Dlocalhost%2526relation%253Dopener%2526frame%253Df2f923f494%26sdk%3Djoey%26display%3Dpopup%26response_type%3Dtoken%252Csigned_request%26domain%3Dlocalhost%26fbconnect%3D1%26from_login%3D1%26client_id%3D190950381025985&rcount=1 | ||
pragma: no-cache | ||
x-content-type-options: nosniff | ||
x-xss-protection: 0 | ||
content-type: text/html; charset=utf-8 | ||
x-fb-debug: /W2RYfyuelhV9Jx2wT4oUuBmfakElo5XwlylV2svgBc= | ||
date: Fri, 04 May 2012 03:46:19 GMT | ||
x-fb-debug: Cc6S/gBb+Jsao7VUoECcAaviIstUuFQ2MKEfSnwwrwA= | ||
date: Tue, 08 May 2012 21:37:19 GMT | ||
content-length: 0 | ||
connection: keep-alive | ||
|
Oops, something went wrong.