Commit graph

88 commits

Author SHA1 Message Date
Dmitry Gozman 57e8617474
chore: refactor impl-side events to be per-class (#3569) 2020-08-21 16:26:33 -07:00
Yury Semikhatsky 1f0e9db0a6
feat(firefox): support context-level screencast api (#3555) 2020-08-20 19:49:30 -07:00
Dmitry Gozman 4c5635434a
fix(permissions): browserContext.grantPermissions to respect the origin (#3542)
Due to wrong type usage, we ignored the origin while granting permissions.
Switching to generated types revealed this issue. We should follow up
with switching all dispatchers to the generated types.
2020-08-20 14:19:27 -07:00
Dmitry Gozman 9ac1bbc2a5
chore: remove more paths and url matches from the server side (#3528) 2020-08-19 13:27:58 -07:00
Yury Semikhatsky 83de0071c9
feat(screencast): add start/stop events on context (#3483) 2020-08-19 12:45:31 -07:00
Dmitry Gozman 745dc339a6
chore: merge Browser{Context,}Base into Browser{Context,} (#3524) 2020-08-19 10:31:59 -07:00
Dmitry Gozman 20c6b85178
chore: remove route/unroute from the server side (#3518)
We only use a global "intercept all requests" handler on
page and browser context, instead of granular ones.
2020-08-18 17:34:04 -07:00
Dmitry Gozman aeadf50165
chore: use HeadersArray instead of Headers object on the server side (#3512)
This simplifies implementation and avoids multiple conversions.
Also adding some tests around lowercase and wrong types.
2020-08-18 15:38:29 -07:00
Dmitry Gozman 9790ea5b5d
chore: align more server-side options with rpc protocol (#3506)
This touches:
- noDefaultViewport;
- ignoreAllDefaultArgs;
- env;
- validateXYZ logic that was copying objects - we do not need that anymore;
- shuffles some converters closer to their usage.
2020-08-18 09:37:40 -07:00
Dmitry Gozman 58fc6b4003
chore: align some server-side methods with rpc calls (#3504)
- Never write to console on the server side - we use stdout for
  communication. This includes logPolitely and deprecate.
- Pass undefined instead of null in some BrowserContext methods.
- Use explicit _setFileChooserIntercepted instead of on/off magic.
2020-08-17 16:19:21 -07:00
Dmitry Gozman 141a255a07
chore: remove unused methods from server side (#3502)
Most of these were api methods that are no longer called directly.
2020-08-17 14:36:51 -07:00
Dmitry Gozman 1e9c0eb705
chore: remove logger infrastructure from server side (#3487)
We do not implement LoggerSink on the server, so we can
use a simple debugLogger.
2020-08-17 14:12:31 -07:00
Dmitry Gozman bc23324878
chore: remove apiName plumbing and some unused methods from server side (#3481)
We append apiName where needed on the client instead.
2020-08-14 18:25:32 -07:00
Joel Einbinder eac8aeedaf
chore(types): convert tests to typescript part 3 (#3340) 2020-08-07 11:19:15 -07:00
Dmitry Gozman 1553f19bab
chore: update error messages to match future rpc validator (#3075) 2020-07-21 15:25:31 -07:00
Dmitry Gozman 4c8ba3ed67
chore: remove cli (#2976)
It will be a separate package instead.
2020-07-16 13:13:26 -07:00
Dmitry Gozman 8fe29feb21
feat(rpc): support more chromium-specific apis (#2883)
This includes page CDPSession, backgroundPages() and serviceWorkers().

This has also revealed an issue with closing order between the context
and the service worker.
2020-07-08 21:36:03 -07:00
Dmitry Gozman 2a86ead0ac
chore: replace FrameTask with internal events on Frame (#2856)
We now use a few helper.waitForEvent calls to wait for internal
events kNavigationEvent and kLifecycleEvent. With these events,
we should be able to replicate logic over rpc.
2020-07-07 15:22:05 -07:00
Andrey Lushnikov 55a07dbf4d
fix: follow-up with offline comments on implementation of deprecation (#2770)
This moves all extra deprecation messages from vendor implementations
into a single vendor-neutral land.
2020-06-30 11:02:12 -07:00
Dmitry Gozman 38236b4f29
fix(close): ensure close() can be called twice (#2744)
... without any exceptions.
2020-06-29 16:26:32 -07:00
Pavel Feldman bc3050776e
chore: prepare library types for rpc (#2706) 2020-06-25 08:30:56 -07:00
Pavel Feldman fca514d74e
chore: move non-trivial types out of types.ts (#2680) 2020-06-23 14:51:06 -07:00
Pavel Feldman c220fc7f46
chore(logs): rework logs for simplicity (#2592) 2020-06-16 17:11:19 -07:00
Pavel Feldman 59d0f8728d
test(recorder): add recorder sanity tests (#2582) 2020-06-16 10:15:08 -07:00
Pavel Feldman 61b11252b4
chore(debug): various debug mode improvements (#2561) 2020-06-13 13:17:12 -07:00
Pavel Feldman 894826dec0
chore: form the debug script for authoring hints / helpers (#2551) 2020-06-11 18:18:33 -07:00
Dmitry Gozman 1bb33650b0
chore: remove ExtendedEventEmitter and inline waitForEvent (#2529) 2020-06-10 15:12:50 -07:00
Dmitry Gozman 80705ff5e9
chore: simplify logging a bit (#2512)
This merges a few classes and stops inheriting from InnerLogger.
2020-06-09 16:11:17 -07:00
Pavel Feldman 9aa9d6bc1d
feat(downloads): accept downloads in persistent, allow specifying the downloadsPath (#2503) 2020-06-08 21:45:35 -07:00
Dmitry Gozman 300099734c
chore: migrate waitForEvent to Progress (#2483)
Drive-by: remove/simplify some helper code.
2020-06-05 14:14:19 -07:00
Pavel Feldman fb058ffe0d
feat(proxy): allow specifying proxy (#2485) 2020-06-05 13:50:15 -07:00
Dmitry Gozman ece4789165
feat(debug): expose playwright object in console (#2365)
- playwright.$ and playwright.$$ to query elements;
- playwright.inspect to reveal an element;
- playwright.clear to remove highlight.
2020-05-27 22:16:54 -07:00
Dmitry Gozman aae3f1e75d
feat(default context): support selected options for default context (#2177) 2020-05-21 15:13:16 -07:00
Pavel Feldman 2bd427ad1d
feat(exposeBinding): a more powerful exposeFunction with source attribution (#2263) 2020-05-18 14:28:06 -07:00
Yury Semikhatsky e081ba7256
chore: improve error message (#2222) 2020-05-13 15:57:26 -07:00
Dmitry Gozman 072dcba94a
api(viewport): do not allow isMobile and deviceScaleFactor for null viewports (#2190)
Also make sure we do not alter viewport when passed null.
2020-05-12 18:31:17 -07:00
Dmitry Gozman ae8d97cdf9
feat(persistent context): ensure initial about:blank (#2161)
We declare only the initial about:blank to be a supported usecase, so that
we can support options for the default context in the future.
2020-05-10 15:23:53 -07:00
Pavel Feldman 5b085fdf03
feat(logger): introduce context-level logger (#1896) 2020-04-20 23:24:53 -07:00
Pavel Feldman 1f43ae692f
feat(logging): introduce logger sink api (#1861) 2020-04-20 07:52:26 -07:00
Dmitry Gozman ba36860d79
feat(api): page.unroute to remove routes (#1813) 2020-04-15 19:55:22 -07:00
Pavel Feldman c6f580faf8
chore: migrate from timeouts to deadlines internally (#1695) 2020-04-07 14:35:34 -07:00
Pavel Feldman 3dc14eddaf
fix(colorScheme): make light scheme default on all browsers (#1668) 2020-04-06 19:49:33 -07:00
Pavel Feldman 75571e8eb8
feat(downloads): support downloads on cr and wk (#1632) 2020-04-02 17:56:14 -07:00
Joel Einbinder 9e85f8d856
chore(waitForEvent): refactor waitForEvent into a single implementation (#1602)
Moves the `waitForEvent` implementation into an `ExtendedEventEmitter` class.

This is step one if we want to add `waitForEvent` to `Worker`, `Browser`, and `BrowserServer` objects. All of these only have a 'close' event, but I still feel we should be consistent with our event emitters.
2020-03-31 16:18:49 -07:00
Pavel Feldman 5a42cbd491
fix(permissions): manage permissions on the proxy level in webkit (#1451) 2020-03-20 19:45:35 -07:00
Dmitry Gozman 16c7a5bd5c
api(eval): accept zero or one arguments in all evaluation functions (#1431) 2020-03-20 15:08:17 -07:00
Pavel Feldman 049b336800
api(devices): extract isMobile/hasTouch from viewport (#1415) 2020-03-17 18:21:02 -07:00
Pavel Feldman e4225adcc0
feat(permissions): make origin optional (#1406) 2020-03-17 15:32:50 -07:00
Dmitry Gozman 69be12ae12
api(route): pass Route object instead of Request to route handlers (#1385)
References #1348.
2020-03-13 14:30:40 -07:00
Dmitry Gozman 9b86c631c8
api: make BrowserContext.pages() synchronous (#1369)
Returns all pages which have been initialized already.

References #1348.
2020-03-13 11:33:33 -07:00