Commit Graph

12 Commits

Author SHA1 Message Date
Andrey Lushnikov
62da2366c6
chore: introduce //lib/api.js (#3835)
Introduce `//lib/api.js` that declares a list of publicly exposed
classes.

The `//lib/api.js` list superceedes dynamic `helper.tracePublicAPI()` calls
and is used in the following places:
- [ASYNC STACKS]: generate "async stacks" for publicy exposed API in `//index.js`
- [COVERAGE]: move coverage support from `//lib/helper` to `//test/utils`
- [DOCLINT]: get rid of 'exluded classes' hardcoded list

This will help us to re-use our coverage and doclint infrastructure
for Puppeteer-Firefox.

Drive-By: it turns out we didn't run coverage for `SecurityDetails`
class, so we lack coverage for a few methods there. These are excluded
for now, sanity tests will be added in a follow-up.
2019-01-25 23:21:14 -05:00
Andrey Lushnikov
e8bb26eb95
refactor: split out classes into files (#3773)
New files:
- LifecycleWatcher
- JSHandle
2019-01-14 20:34:50 -08:00
Joel Einbinder
29a2438534 chore(types): Upgrade TypeScript to 3.2.2 (#3754) 2019-01-10 22:56:39 -08:00
Andrey Lushnikov
89fc2adff5
fix(page): consoleMessage.location() should work with workers (#3752)
This patch:
- refactors consoleMessage.location() implementation to
make it work for workers
- re-writes tests to avoid 5 second delay
2019-01-10 18:05:28 -08:00
Andrey Lushnikov
d6eb3b4d52
refactor: drop object factory from execution context (#3099)
This patch:
- merges `ElementHandle` into `ExecutionContext` (for simplicity; there's no good reason to have them in separate files).
- removes the necessity to pass handle factory when creating `ExecutionContext`

This makes it easier to create execution contexts out of payloads.

References #1215
2018-08-16 16:16:27 -07:00
Joel Einbinder
2e0007669d chore: upgrade to TypeScript 3.0.1 (#3024) 2018-08-06 11:31:33 -07:00
Yaniv Efraim
aae73f5fd7 feat(worker): implement pageerror event from a worker (#2795)
Fixes #2761
2018-06-25 15:10:36 -07:00
Joel Einbinder
75ba86f41a
fix: emit all arguments from worker console logs (#2697)
Log.entryAdded doesn't report all the arguments from console logs. This PR switches to use Runtime.consoleAPICalled.

fixes #2640
2018-06-07 11:21:35 -07:00
Joel Einbinder
2ff0adcad8 feat: worker convenience methods (#2677)
This patch:
- adds `worker.evaluate` and `worker.evaluateHandle` methods as a shortcut to their execution context equivalents.
- makes the error messages a bit nicer when interacting with a closed worker (as opposed to a closed page).
- moves the worker tests into their own spec file.
2018-06-06 20:16:17 -05:00
Joel Einbinder
a058468948 feat: roll Chromium to r564778 (#2681)
This roll includes:
- https://chromium-review.googlesource.com/c/v8/v8/+/1086372 - [inspector] postpone API interrupts during creation of injected script

This fixes worker flakiness.

Fixes #2632
2018-06-06 09:48:56 -05:00
Joel Einbinder
1c2adf61e9 fix(workers): workaround worker execution context flakiness (#2596)
Some of the worker tests were failing on the bots. After investigating, I found one race in the test, and one race upstream in Chromium which I filed upstream as https://crbug.com/846099. But I added a small hack here as a temporary workaround.

References #2632
2018-05-30 18:08:27 -07:00
Joel Einbinder
93fe2b57d6 feat(Page): introduce workers (#2560)
This adds `page.workers()`, and two events `workercreated` and `workerdestroyed`. It also forwards logs from a worker into the page `console` event.

Only dedicated workers are supported for now, ServiceWorkers will probably work differently because they aren't necessarily associated with a single page.

Fixes #2350.
2018-05-21 14:31:11 -07:00