Commit Graph

1560 Commits

Author SHA1 Message Date
Andrey Lushnikov
85ecce31f9 Add Request.abort() test
This patch:
- introduces StaticServer for the testing purposes
- switches tests from navigating to file:// to http://
- adds a test to cover Request.abort() functionality

References #1
2017-06-15 08:26:55 -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
dbffc3c35c Await promises returned from the inPageCallback
This patch teaches puppeteer to await promises returned
from the inPageCallback.
2017-06-14 08:21:56 -07:00
Andrey Lushnikov
2f74644cb8 Puppeteer's Page.navigate should not throw with invalid URL.
This patch makes puppeteer's Page.navigate to just return
'false' when given an invalid URL.
2017-05-14 22:17:57 -07:00
Andrey Lushnikov
939038bb08 Convert event names to small caps
This patch takes inspiration from DOM events and makes all the
events small-caps.
2017-05-13 12:04:30 -07:00
Andrey Lushnikov
cf900cf717 Add missing test assets
This patch adds missing assets/empty.html which is needed for one of
the puppeteer tests.
2017-05-13 11:18:52 -07:00
Andrey Lushnikov
15b36b1cf0 Drop unneeded Page Event's prefixes.
This patch drops 'Page.Event.' prefix in every puppeteer's page
event. This makes it convenient to subscribe to events by their
string value.
2017-05-13 11:12:06 -07:00
Andrey Lushnikov
8a8076c15b Rename Page.Events.ConsoleMessageAdded -> Page.Events.ConsoleMessage
This patch:
- renames ConsoleMessageAdded into ConsoleMessage for the sake of
  clarity
- adds a test to cover basic functionality
2017-05-13 11:05:54 -07:00
Andrey Lushnikov
e8af69e5bb Make in-page callback survive navigations
This patch makes in-page callbacks survive navigations via
running in-page harness code on page load.
2017-05-12 17:55:29 -07:00
Andrey Lushnikov
6fc54665e4 Add minimal test framework
This patch adds some minimal tests for puppeteer's Page using
Jasmine.
2017-05-12 16:38:07 -07:00