- ๐ญ Work: Axiom
- ๐ฌ Passion: Data-Structures, DBs, Algorithms
seiflotfy / compatipede Goto Github PK
View Code? Open in Web Editor NEWAutomating Compatibility
License: Mozilla Public License 2.0
Automating Compatibility
License: Mozilla Public License 2.0
Here's a small test case with JavaScript sniffing that navigates to different URLs: http://hallvord.com/temp/moz/compatTesterTesting/jsredirect.htm
We could add some code to compare the main frame's URL when loading finishes with the URL we passed in initially, and append to redirect list if the URLs are different.
It will miss stuff like
display: -webkit-flex
CSS problem finder should not exclude code inside @ rules
Try to run for example http://m.46644.com/tool/caipiao/?tpltype=firefox - script seems to hang with the error above.
Nice if we can fix this both with some smarter encoding handling AND with a better error handling to try to make sure no errors will ever hold up the URL playing..
To target pass/fail heuristics at specific sites, we can let plug-ins override the logic in the rest of the script.
For example, given the fictive jQuery 1.6 problem in the spec.txt file we'd probably want to say that sites where this plugin found a match were "fails" regardless of other results. We could add a new property to the JSON:
{
"name": "jQuery-1.6-check",
"javascript": "try{ jQuery().jquery === "1.6" }catch(e){}",
"markMatchesAs": "fail"
And add a little bit of code handling this.
Was mozcompat the old name--should this be changed to compatipede?
If display: -webkit-box or display: box is found, the problem analysis code needs to check if there is a display: flex around.
Some JS have redirections based on screen sizes.
This is a little harder than it sounds - there may be hundreds if not thousands of messages for some sites. We should probably make a unique set for each browser instance - not saving any duplicate messages - and then check if both sets contain the same entries (order is irrelevant).
To handle Google and others who redirect to URLs with random session nonces in the query string, we should parse the result URLs and compare only host and pathname. If both host and path matches, the redirects should be considered equal.
make sure that the Accept: HTTP header the Gecko instance sends matches the one a real Gecko instance would send..
When creating a run on X number of sites, it is sometimes useful to be able to compare the code, HTTP trace, Redirections, etc. from date1 and date2 for each sites.
It might create a huge volume of data. It would be good to define what is the best model to keep the record of this snapshot.
When pushing m.ireader.com to Compatipede it seems to take a loooong time to conclude the analysis. I think it is confused by the WAP Content-type header and waits for some timeout.
We should add testing for text/vnd.wap.wml by default, and mark page as failed if any content is delivered with this MIME type.
We have the status:pass/fail field, but when we keep adding heuristics and rules it will eventually take us more and more time to figure out why the script said pass or fail for that site.
We should probably add a "failing tests" list to make this clear. For example
"pass":"false",
"failures": ["redirect", "content", "plugin: foo"]
will save us some head-scratching later on.
To get the new webcompat.py running, I had to do
apt-get install rabbitmq-server
pip install pika
pip install pymongo
Should be added to readme.md :)
I get the below output for "redirects" - it seems to add information for every resource, including external scripts, img and stylesheets. We don't need this data - we should figure out a way to track redirects for the main URL only:
'redirects': {'ios': [u'http://video.ft.com/2836530119001/Typhoon-damage-exacerbated-by-poverty/Editors-Choice', u'http://media.ft.com/null.js', u'http://4235225.fls.doubleclick.net/activityi;src=4235225;type=homeo886;cat=ft-ho780;u7=NOR;u5=1;u1=;ord=1;num=8885692604817.45;~oref=http%3A%2F%2Fvideo.ft.com%2F2836530119001%2FTyphoon-damage-exacerbated-by-poverty%2FEditors-Choice?&_dc_ck=try', u'http://ib.adnxs.com/bounce?%2Fseg%3Fadd%3D1001722%26t%3D2', u'https://www.facebook.com/fr/u.php?p=391363987594223&m=0', u'http://beacon.krxd.net/usermatch.gif?partner=exelate', u'http://api.bizographics.com/v1/profile.redirect?api_key=595bae8dbc0c4c42b4544e688b10c002&callback_url=http%3A//beacon.krxd.net/data.gif%3F_kdpid%3D890a6228-04af-4630-85b6-0b49dee6157f%26pid%3Dbcbe1a6d-fa90-4db5-b4dc-424c69802310&3pc=true', u'http://beacon.krxd.net/data.gif?_kdpid=890a6228-04af-4630-85b6-0b49dee6157f&pid=bcbe1a6d-fa90-4db5-b4dc-424c69802310'], 'fos': [u'http://video.ft.com/2836530119001/Typhoon-damage-exacerbated-by-poverty/Editors-Choice', u'http://media.ft.com/null.js', u'http://4235225.fls.doubleclick.net/activityi;src=4235225;type=homeo886;cat=ft-ho780;u7=;u5=1;u1=;ord=1;num=9517158693633.973;~oref=http%3A%2F%2Fvideo.ft.com%2F2836530119001%2FTyphoon-damage-exacerbated-by-poverty%2FEditors-Choice?&_dc_ck=try', u'http://ib.adnxs.com/bounce?%2Fseg%3Fadd%3D1001722%26t%3D2', u'https://www.facebook.com/fr/u.php?p=391363987594223&m=0', u'http://api.bizographics.com/v1/profile.redirect?api_key=595bae8dbc0c4c42b4544e688b10c002&callback_url=http%3A//beacon.krxd.net/data.gif%3F_kdpid%3D890a6228-04af-4630-85b6-0b49dee6157f%26pid%3Dbcbe1a6d-fa90-4db5-b4dc-424c69802310&3pc=true', u'http://beacon.krxd.net/data.gif?_kdpid=890a6228-04af-4630-85b6-0b49dee6157f&pid=bcbe1a6d-fa90-4db5-b4dc-424c69802310', u'http://beacon.krxd.net/usermatch.gif?partner=exelate']
To enable proper compatibility tests we will need test with gecko and webkit instead of webkit only. I suggest we rewrite view.py in JS and execute it from the browser.py via phantomjs (webkit) and slimerjs (gecko). This should work flawlessly since slimerjs is based on phantomjs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.