I have made a preliminary port of PhantomJS 2 to Qt 5.5, and have built a 
debian package out of it, as well as run it successfully on a project I'm 
working on.

----
$ apt-cache show phantomjs
Package: phantomjs
Status: install ok installed
Priority: extra
Section: web
Installed-Size: 2485
Maintainer: TANIGUCHI Takaki <tak...@debian.org>
Architecture: amd64
Version: 2.0.0+git20150917-1~1.gbp664ad6
Depends: libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libgl1-mesa-glx | libgl1, 
libqt5core5a (>= 5.5.0), libqt5gui5 (>= 5.0.2), libqt5network5 (>= 5.3.0), 
libqt5printsupport5 (>= 5.2.0), libqt5webkit5 (>= 5.2.0), libqt5widgets5 (>= 
5.0.2), libstdc++6 (>= 5.2)
Description-en: minimalistic headless WebKit-based with JavaScript API
 PhantomJS is a headless WebKit with JavaScript API. It has fast and native
 support for various web standards: DOM handling, CSS selector, JSON, Canvas,
 and SVG.
 .
 PhantomJS is an optimal solution for headless testing of web-based
 applications, site scraping, pages capture, SVG renderer, PDF converter
 and many other use cases.
Description-md5: bf355eb2a4481e2b6c41bfbf308d318e
Homepage: http://www.phantomjs.org/

$ PHANTOMJS_BIN=/usr/bin/phantomjs make phantomjs-test 
make BROWSER=PhantomJS karma-test
make[1]: Entering directory 'XXXX'
node ./node_modules/karma/bin/karma start --single-run=true --colors=false \
   --browsers=PhantomJS karma.conf.js
10 11 2015 21:32:39.968:INFO [karma]: Karma v0.13.15 server started at 
http://localhost:9876/
10 11 2015 21:32:39.975:INFO [launcher]: Starting browser PhantomJS
10 11 2015 21:32:40.552:INFO [PhantomJS 2.0.0 (Linux 0.0.0)]: Connected on 
socket X_G1sNm5eINBrl6qAAAA with id 89100649
PhantomJS 2.0.0 (Linux 0.0.0) WARN: 'asmCrypto PRNG not seeded; your security 
relies on your system PRNG. If this is not acceptable, use 
asmCrypto.random.seed().'

PhantomJS 2.0.0 (Linux 0.0.0): Executed 293 of 293 SUCCESS (2 mins 29.205 secs 
/ 2 mins 26.052 secs)
make[1]: Leaving directory 'XXXX'
----

Attached is the patch, please review. I will tidy up the Debian package then 
file it upstream. I am unsure about certain things, for example:

- The "webSecurity" option now has no effect, because it's not exposed in Qt 
5.5. I'm not sure if this has any practical implications.
- in cookiejar.cpp I replaced a quint32 with effectively a uint. Not sure if 
this is a security concern, I'm not a C++ guy.

But hey at least it works. :)

X

-- 
GPG: 4096R/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git

Reply via email to