Commit graph

50 commits

Author SHA1 Message Date
Dmitry Gozman deccddba24
feat(rpc): update BrowserServer (#3112)
- Make BrowserServer a scope.
- Plumb exitCode and signal to BrowserServer.on('close').
- Use toImpl in a test.
2020-07-24 10:17:07 -07:00
Dmitry Gozman 68c4f79b02
feat(rpc): convert protocol to yaml (#3102) 2020-07-22 19:38:19 -07:00
Dmitry Gozman b1a5a02154
feat(rpc): client-side parameters validation (#3069) 2020-07-22 18:05:07 -07:00
Dmitry Gozman 65002a0ac2
feat(rpc): support firefox user prefs (#3093)
Also ignore firefoxUserPrefs in launchPersistentContext according to our api.
2020-07-22 17:20:00 -07:00
Pavel Feldman 80c0711d98
feat(firefox): roll firefox to r1137 (#3095) 2020-07-22 15:59:37 -07:00
Ross Wollman d8a17fb0ab
api(download): Add saveAs helper (#2872) 2020-07-22 14:55:27 -07:00
Dmitry Gozman ced0bc2d1b
api: make clear the use of null in page.emulateMedia (#3078)
We can pass null to disable emulating particular feature.
This change updates the docs and rpc protocol accordingly.
2020-07-21 18:56:41 -07:00
Dmitry Gozman db4e856a57
feat(rpc): use SerializedValue for CDPSession (#3076)
This is our way to define a schema for arbitrary values.
2020-07-21 15:58:00 -07:00
Dmitry Gozman 18cb1c017a
feat(rpc): inline selectors.register options in the protocol (#3072) 2020-07-21 14:41:33 -07:00
Dmitry Gozman 3dd61629e0
feat(rpc): update Response.finished to return string instead of Error (#3071) 2020-07-21 14:40:53 -07:00
Dmitry Gozman 3dead4c8d1
feat(rpc): remove last union types from the protocol (#3059) 2020-07-21 12:44:30 -07:00
Pavel Feldman 99658c2d32
feat(bringToFront): enable on all browsers (#3052) 2020-07-21 09:36:54 -07:00
Dmitry Gozman 2d59a8f9c2
feat(rpc): remove some union types (#3058) 2020-07-21 08:26:48 -07:00
Dmitry Gozman 5848ed8f41
feat(rpc): introduce protocol.pdl (#3054)
We now generate channels.ts from the protocol definition. There are still some shortcomings,
like union types - these will be addressed in follow ups.
2020-07-20 17:38:06 -07:00
Dmitry Gozman 29504c0824
feat(rpc): make SerializedValue format pdl-friendly (#3007)
This avoids sum types and instead uses different fields
for different types.
2020-07-19 19:46:19 -07:00
Dmitry Gozman d8bedd851d
chore: explicitly type SerializedArgument, fix rpc dispatchEvent (#2988)
We now have types for SerializedValue/SerializedArgument. This will
allow us to avoid double parse/serialize for evaluation arguments/results.

Drive-by: typing exposed a bug in ElementHandle.dispatchEvent().
2020-07-17 09:53:13 -07:00
Dmitry Gozman 5cf3e4f0f2
feat(rpc): switch Env to use an array, split ignoreDefaultArgs (#2984) 2020-07-17 09:32:27 -07:00
Dmitry Gozman b890569afc
feat(rpc): move leftover extraHTTPHeaders to HeadersArray (#2980) 2020-07-16 13:36:22 -07:00
Dmitry Gozman 439e048a4c
feat(rpc): migrate DeviceDescriptors payload to an array (#2981)
Currently it is an object with arbitrary keys - that makes it
hard to have a protocol definition.
2020-07-16 13:18:54 -07:00
Dmitry Gozman aa4c893b09
feat(rpc): implement waitForNavigation on the client (#2949)
Drive-by: fix electron issues, exposed by the test using
waitForNavigation.

Drive-by: mark some tests skip(CHANNEL) that were mistakenly
marked skip(USES_HOOKS).
2020-07-15 18:48:19 -07:00
Dmitry Gozman c51ea0afd1
feat(rpc): remove PageAttribution from the protocol, attribute on the client side (#2957)
This also changes timeout error format to
"page.click: Timeout 5000ms exceeded", so that all errors
can be similarly prefixed with api name.

We can now have different api names in different clients,
and our protocol is more reasonable.
2020-07-15 14:04:39 -07:00
Dmitry Gozman 7f6171579b
feat(rpc): use headers array in the protocol (#2959) 2020-07-15 13:21:21 -07:00
Dmitry Gozman 2d5c0328cd
feat(rpc): return objects for every protocol command (#2950)
For future extensibility, returning objects with fields instead
of plain strings or channels.
2020-07-14 18:26:50 -07:00
Pavel Feldman d5bd459986
chore(rpc): remove some paths from the channel (#2934) 2020-07-14 10:51:37 -07:00
Dmitry Gozman cc8fe5a763
feat(rpc): support electron (#2933) 2020-07-13 21:46:59 -07:00
Dmitry Gozman 9fdb3e23c3
feat(rpc): support selectors (#2936) 2020-07-13 17:47:15 -07:00
Dmitry Gozman 65d45c18c3
feat(rpc): introduce Waiter for various waitFor implementations (#2935)
Use it for waitForEvent and waitForLoadState.
2020-07-13 16:03:24 -07:00
Dmitry Gozman 9fd30e58e2
feat(rpc): ensure feature-detection works as before (#2898)
For this, some tests are migrated from skip() to feature detection,
like our users would do.
2020-07-13 15:26:09 -07:00
Pavel Feldman 631f76df75
chore(rpc): remove union types from page and handles (#2912) 2020-07-10 15:39:11 -07:00
Pavel Feldman c89c30e333
fix(popup): do not report frameless pages (#2910) 2020-07-10 13:15:39 -07:00
Dmitry Gozman a91ec9a15d
feat(rpc): pass more tests (#2896)
Includes coverage, tracing and misc close() tests.
2020-07-09 15:33:01 -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
Pavel Feldman b3ca4afd40
chore: misc test fixes (#2857) 2020-07-08 18:42:31 -07:00
Pavel Feldman 6209d14f87
chore: misc test fixes (#2888) 2020-07-08 18:42:04 -07:00
Dmitry Gozman 0c80c22716
feat(rpc): plumb CDPSession (#2862) 2020-07-07 18:47:00 -07:00
Pavel Feldman 6bbe7eb006
chore(rpc): inline options parameter in all rpc channels (#2842) 2020-07-06 10:04:09 -07:00
Pavel Feldman 2540805bf2
chore(rpc): misc serializer improvements (#2832) 2020-07-03 18:04:08 -07:00
Pavel Feldman c15dc94f8e
chore(rpc): explicitly create page dispatcher (#2799) 2020-07-01 18:36:09 -07:00
Pavel Feldman 95538e73e7
chore(rpc): move classes around, fix tests, respect dispatcher scopes (#2784) 2020-06-30 22:21:17 -07:00
Pavel Feldman e29f7b9f58
chore(rpc): support workers, file chooser, browser server (#2766) 2020-06-30 10:55:11 -07:00
Pavel Feldman 5bb018e0e5
chore(rpc): attribute calles to page, ignore USES_HOOKS (#2764) 2020-06-29 18:58:09 -07:00
Pavel Feldman 3a7d629c61
chore(rpc): pass more network tests (#2762) 2020-06-29 16:37:38 -07:00
Pavel Feldman 4e94bdabfd
chore(rpc): serialize rpc into actual wire string (#2740) 2020-06-27 11:10:07 -07:00
Pavel Feldman 3e33523ee3
chore(rpc): clear the browsercontext test spec (#2739) 2020-06-26 22:38:21 -07:00
Pavel Feldman db12ddebb3
chore(rpc): clear the page test spec (#2736) 2020-06-26 21:22:03 -07:00
Pavel Feldman 6393407a6a
chore(rpc): support downloads, dialogs, persistent context (#2733) 2020-06-26 17:24:21 -07:00
Pavel Feldman 02f7501725
chore(rpc): strongly-type the initializer, remove __init__ phase (#2729) 2020-06-26 12:28:27 -07:00
Pavel Feldman 18d6140d3e
chore(rpc): support routes and bindings (#2725) 2020-06-26 11:51:47 -07:00
Pavel Feldman 71618a9e2b
chore(rpc): implement input, a11y, console (#2722) 2020-06-25 18:01:18 -07:00
Pavel Feldman bab6833232
chore: introduce the experimental rpc implementation (#2720) 2020-06-25 16:05:36 -07:00