Commit graph

123 commits

Author SHA1 Message Date
Pavel Feldman 2f5a0a6c07
test: slowly removing testOptions (#3464) 2020-08-14 07:22:54 -07:00
Pavel Feldman 31fac37780
test: allow overriding the worker fixtures (#3460) 2020-08-13 20:35:26 -07:00
Pavel Feldman 6abc352498
test: remove output and golden directory notions (#3456) 2020-08-13 17:32:27 -07:00
Dmitry Gozman 9b52ca8676
chore: remove unused non-rpc code, test options, infra, bots (#3444) 2020-08-13 16:00:23 -07:00
Dmitry Gozman 18b2cf5ec7
feat(rpc): use rpc protocol for browserType.connect (#3380) 2020-08-13 13:24:49 -07:00
Pavel Feldman 4bb2658e74
test: fix create output folder (#3431) 2020-08-12 22:41:40 -07:00
Joel Einbinder ec24516e66
chore(test): remove try/finally pattern from fixtures (#3409) 2020-08-12 17:51:07 -07:00
Joel Einbinder 6054f14794
chore(tests): convert all tests to typescript (#3384) 2020-08-11 15:50:53 -07:00
Joel Einbinder d76166beca
chore(test): require playwright fixtures from userland (#3355)
This patch moves fixtures.js to base.fixtures.ts that sits next to tests. All tests get an extra import to get the base fixtures (both types and implementations).
2020-08-10 16:48:34 -07:00
Dmitry Gozman 7e2cc77524
test: add a test for newCDPSession rejecting on non-pages (#3353) 2020-08-07 15:40:46 -07:00
Joel Einbinder eac8aeedaf
chore(types): convert tests to typescript part 3 (#3340) 2020-08-07 11:19:15 -07:00
Pavel Feldman 4cbfa09c2c
test: remove describes (5) (#3294) 2020-08-04 15:57:25 -07:00
Dmitry Gozman 10225d1983
test: fix a race in the oopif test (#3211) 2020-07-29 14:42:28 -07:00
Dmitry Gozman fab5eba64f
fix(oopifs): translate coordinates to viewport (#3201)
Renderer-based method DOM.getContentQuads and DOM.getBoxModel return
coordinates relative to the local root's viewport, but we need them relative
to the root viewport.
2020-07-28 15:52:33 -07:00
Dmitry Gozman 91e1a25f34
feat(rpc): gracefully close browsers in server process on disconnect (#3005) 2020-07-17 16:14:23 -07:00
Pavel Feldman 24f6d19e27
test: move remaining tests to jest (#3009) 2020-07-17 13:02:50 -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 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 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 2151757621
feat(rpc): run rpc tests in-process and out-of-process (#2929) 2020-07-13 15:00:20 -07:00
Pavel Feldman ebb4c3320f
test: mark 2 chromium not important win tests as failed (#2914) 2020-07-10 16:15:12 -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 7039409397
test: skip devtools test with USES_HOOKS (#2895) 2020-07-09 13:45:28 -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 0c80c22716
feat(rpc): plumb CDPSession (#2862) 2020-07-07 18:47:00 -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
Dmitry Gozman 5e97acde0c
fix(oopif): make Page.addInitScript and Page.exposeBinding work for oopifs (#2542) 2020-06-11 11:41:36 -07:00
Dmitry Gozman 8c6c571f22
test: add iframe screenshot tests (#2495) 2020-06-09 12:59:49 -07:00
Dmitry Gozman 454411062b
fix(oopif): race between detachedFromTarget and frameAttached (#2419)
During remote -> local transition, these two events come in unpredictable order, so we try to handle both cases. Also, remote frame detach was not handled at all.
2020-06-01 13:47:02 -07:00
Pavel Feldman 5ee6494032
feat(evaluate): return user-readable error from evaluate (#2329) 2020-05-21 16:00:55 -07:00
Dmitry Gozman 481643409e
feat(debug): persist devtools preferences in Chromium (#2266)
We store devtools-preferences.json file in the downloaded browser directory.
2020-05-19 14:55:11 -07:00
Dmitry Gozman 359cb3a740
fix(oopif): adopt main requests into oopifs (#2284)
Main request for an OOPIF starts in the parent session, and the oopif
session is create only after the response has been received. Therefore,
we should adopt the request after oopif session is created.
2020-05-18 17:13:51 -07:00
Dmitry Gozman 963dc72dd2
devops: add headful linux bot (#2060) 2020-05-04 15:15:51 -07:00
Pavel Feldman 022bc67c07
chore(chromium): allow passing --remote-debugging-port for debugging (#1857) 2020-04-18 19:06:42 -07:00
Andrey Lushnikov 26018aae25
feat(chromium): roll Chromium to r759486 (#1823)
This roll includes:
- https://crrev.com/759486 - devtools(protocol): Input.dispatchMouseEvent to properly find target widget host

Fixes #1240
2020-04-16 09:38:28 -07:00
Dmitry Gozman 274c6c1450
test(chromium): add more oopif tests (#1685) 2020-04-14 13:00:10 -07:00
Dmitry Gozman 29a6cdff6b
fix(tests): fix a race with golden setup (#1757)
When running multiple browsers, we should take the golden information from the state.
2020-04-13 14:12:44 -07:00
Dmitry Gozman 62a493ecbd
chore(test): move more test options to state (#1761)
This reduces the number of globals and allows to configure more options dynamically.
2020-04-12 22:19:26 -07:00
Dmitry Gozman 277c7d872f
test: close extra browser (#1756) 2020-04-12 15:30:53 -07:00
Dmitry Gozman ade9d23c28
test: remove module.export.describe wrapper (#1716) 2020-04-08 15:19:09 -07:00
Dmitry Gozman af01d15f62
test: slim down test utils (#1701) 2020-04-07 19:15:48 -07:00
Dmitry Gozman e0c8fbf1a6
test: put test runner api on global, remove unused parameters (#1684) 2020-04-07 08:10:31 -07:00
Dmitry Gozman aeeac55732
feat(chromium): support oopifs (#1664)
Splits CRPage into CRPage and FrameSession, carefully broadcasting or picking the right session for each operation.
2020-04-06 15:09:43 -07:00
Pavel Feldman 4e89939ece
chore: do not try/catch buffer.concat (#1575) 2020-03-27 15:16:17 -07:00
Yury Semikhatsky 535b484637
api(context): get rid of PageEvent (#1433) 2020-03-19 16:25:12 -07:00
Yury Semikhatsky 3ed9970b33
api(chromium): add ChromiumBrowserContext.serviceWorkers() (#1416) 2020-03-19 16:10:24 -07:00
Andrey Lushnikov f5ecbff16e
devops: remake downloading logic (#1419)
This patch:
- removes `browserType.downloadBrowserIfNeeded()` method. The method
  turned out to be ill-behaving and cannot not be used as we'd like to (see #1085)
- adds a `browserType.setExecutablePath` method to set a browser
  exectuable.

With this patch, we take the following approach towards managing browser downloads:
- `playwright-core` doesn't download any browsers. In `playwright-core`, `playwright.chromium.executablePath()` returns `null` (same for firefox and webkit).
- clients of `playwright-core` (e.g. `playwright` and others) download browsers one way or another.
They can then configure `playwright` with executable paths and re-export the `playwright` object to their clients.
- `playwright`, `playwright-firefox`, `playwright-chromium` and `playwright-webkit` download 
browsers. Once browsers are downloaded, their executable paths are saved to a `.downloaded-browsers.json` file. This file is read in `playwright/index.js` to configure browser executable paths and re-export the API.
- special case is `install-from-github.js` that also cleans up old browsers.
2020-03-19 11:43:35 -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