Commit Graph

12 Commits

Author SHA1 Message Date
Andrey Lushnikov
3d3e8dd038 Implement frame switching api in phantom shim
This patch implements frame switching api in phantom shim and
passes the relevant test.

This makes sure that puppeteer's frames API is comprehensive.

Fixes #4.
2017-07-06 14:51:34 -07:00
Andrey Lushnikov
4372674c99 Improve Phantom_Shim to handle more scenarios. (#49)
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
2017-07-05 10:07:36 +03:00
Andrey Lushnikov
9508396e3e Mark phantomjs/test/module/webpage/render.js as unsupported
The test does a binary comparison of output results,
which is not sufficient for puppeteer. Puppeteer has
it's own screenshot tests.
2017-06-23 11:12:50 -07:00
Andrey Lushnikov
78e879925f Unflake abort-network-request.js on Travis-Ci
The patch increases timeout up to 5 seconds.
2017-06-21 16:31:11 -07:00
Pavel Feldman
8e0a3ac6d9 Make InPageCallback async (#24)
Fixes #20
2017-06-21 14:11:52 -07:00
Andrey Lushnikov
50976c7f29 Implement Request.setHeader() method
This patch implements Request.setHeader() method to override
request headers.

References #8.
2017-06-15 08:37:06 -07:00
Andrey Lushnikov
e274c26e8b Implement Page.setRequestInterceptor
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
2017-06-15 08:26:50 -07:00
Andrey Lushnikov
79ceb0c439 Consolidate phantom shim code in the phantom-shim folder
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
2017-06-14 02:27:19 -07:00
Andrey Lushnikov
8a5b3d3e05 Fix phantom's test module/webserver/request.js
This patch increases timeout of the test so that it
passes on Linux.
2017-06-14 02:27:03 -07:00
Andrey Lushnikov
6c0e3ebe3e Fix tests and puppeteer shim after c08f1447
This patch:
- fixes require statements inside bin/puppeteer.js
- fixes phantom's run_tests.py to correctly refer to puppeteer
2017-05-15 00:17:34 -07:00
Andrey Lushnikov
10d388b9b1 add phantomjs examples under third_party/phantomjs/examples 2017-05-12 10:33:14 -07:00
Andrey Lushnikov
2cda8c18d1 Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00