35 Commits

Author SHA1 Message Date
Dmitry Gozman
6fe1cd9812
chore: move protocol files to src/protocol (#3571) 2020-08-21 18:46:11 -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
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
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
18b2cf5ec7
feat(rpc): use rpc protocol for browserType.connect (#3380) 2020-08-13 13:24:49 -07:00
Dmitry Gozman
126b1f79d4
feat(rpc): run doclint against rpc client (#3260) 2020-07-31 17:00:36 -07:00
Dmitry Gozman
3bd97776b8
feat(rpc): do not use server types and events in rpc/client (#3219)
This change removes almost all dependencies from rpc/client
to the rest of the project. The last ones would be utilities
like helper, converters, etc.
2020-07-29 17:26:59 -07:00
Dmitry Gozman
6cb1e03713
feat(rpc): disallow deps into rpc client from outside (#3199)
For this, common converters are extracted from rpc serializers.
2020-07-28 15:33:38 -07:00
Dmitry Gozman
b2179193c6
feat(rpc): replace implicit scopes with explicit dispose (#3173)
This adds one more protocol message __dispose__
to dispose a scope and all child objects.

Now, client side does not need a notion of scope anymore -
it just disposes the whole object subtree upon __dispose__.
Server, on the other hand, marks some objects as scopes
and disposes them manually, also asserting that all parents
are proper scopes.
2020-07-27 10:21:39 -07:00
Pavel Feldman
2b0b0a9119
fix(misc): assorted fixes (#3031) 2020-07-21 23:48:21 -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
Pavel Feldman
1c0504ae28
test: respect fixtures in describe, match image snapshots (#2989) 2020-07-16 22:38:52 -07:00
Dmitry Gozman
056f0e290d
feat(rpc): ensure that error stack traces point to the user code (#2961)
This also adds more "_wrapApiCall" calls for correct logs and stack traces.
2020-07-16 14:32:21 -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
Dmitry Gozman
cc8fe5a763
feat(rpc): support electron (#2933) 2020-07-13 21:46:59 -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
Dmitry Gozman
6674458496
feat(rpc): log api calls into LoggerSink (#2904) 2020-07-10 18:00:10 -07:00
Dmitry Gozman
b6fd4dc56c
feat(rpc): merge ChannelOwner and ConnectionScope (#2911) 2020-07-10 15:11:47 -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
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
c25fc4956d
chore(rpc): scope client-side handles (#2796) 2020-07-01 13:55:29 -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
3a7d629c61
chore(rpc): pass more network tests (#2762) 2020-06-29 16:37:38 -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
bab6833232
chore: introduce the experimental rpc implementation (#2720) 2020-06-25 16:05:36 -07:00