firefox - Is it possible to 'pretend' a site is a third party to test functionality if 3rd party cookies are blocked? -


i automation testing company trying implement single sign on via iframe; third party site include our page in iframe , authorization.

we had rework way worked because of firefox defaulting 3rd party cookies being off. manual testing, have hosted page on different domain, domain requires usernames , passwords cannot expose in code, difficult automate.

is there way can trick firefox thinking mydomain.com not mydomain.com? sounds impossible, because if can trick firefox thinking i'm on mydomain2.com, can put on 3rd party cookie, since i'm doing on own instance of firefox, there settings can change in profile confuse it?

yes, incredibly easy , time.

log onto test machine (the computer running browser) , edit hosts file, located in c:\windows\system\drivers\etc

add entry site wish confused, using different domain name correct ip address. because it's different domain, it'll third party site, because ip address same, requests sent same web server.

example:

assume web server running on local host (which has address 127.0.0.1)

add host entries for

127.0.0.1   firstpartydomain.com 127.0.0.1   thirdpartydomain.com 

access site via http://firstpartydomain.com

site contains iframe

<iframe src="thirdpartydomain.com/setnastycookies"> 

the request in iframe go same server (local host) in context of third party site.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -