This patch improves phantom_shim:
- introduce WebPage.loading/WebPage.loadingProgress
- improve compatibility of WebPage.onInitialized. This allows to
pass phantomjs tests, even though the implementation is hacky.
- teach PhantomResponse about "stage" state which could be either
"start" or "end"
- unskip a bunch of phantom webpage tests:
- webpage/change-request-encoded-url
- webpage/loading.js
- webpage/long-running-javascript.js
- webpage/modify-header.js
- webpage/on-initialized.js
- webpage/remove-header.js
This patch:
- introduces Request class.
- implements Page.setRequestInterceptor method. The method
allows to install a callback which will be called for every request
with a |Request| object as a single parameter. The callback is free
to override certain request's properties and then either continue or
abort it.
- implements request interception api for phantom-shim and unskips the
module/webpage/abort-network-request.js phantomjs test
References #1
This patch:
- renames phantomjs folder into phantom_shim
- moves bin/puppeteer into a phantom_shim/runner.js and
merges the file with phantomjs/index.js
- removes "bin" field from the package.json - it is confusing
to have phantom shim installable