Commit Graph

1373 Commits

Author SHA1 Message Date
Yury Semikhatsky
bae56ea9d3
fix(chromium): support main resource request interception for popups (#1449) 2020-03-20 16:13:42 -07:00
Yury Semikhatsky
053bab1afd
browser(webkit): correctly detect Promise created in another window (#1446) 2020-03-20 15:53:04 -07:00
Yury Semikhatsky
4320d4ba83
test: fix link navigation test so that it passes in Chromium (#1448) 2020-03-20 15:45:20 -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
fcdfa9ca24
browser(firefox): implement geolocation overrides (#1437) 2020-03-20 11:14:42 -07:00
Joel Einbinder
fa02b841a9
test(types): add test for types (#1445) 2020-03-20 10:40:02 -07:00
Joel Einbinder
825555cddf
types: better types (#1166)
This generates typescript definitions based on the api.md, instead of autogenerating them from the typescript source code.

Now types
 - only include the public api
 - work with older versions of typescript
 - include descriptions
 - are more consistent
 - are more complete

#6
2020-03-20 01:30:35 -07:00
Yury Semikhatsky
f1d97b0466
chore(docs): remove remaining mentions of Chromium targets (#1435) 2020-03-19 20:25:31 -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
Yury Semikhatsky
c6696746dc
feat(chromium): roll Chromium to 751710 (#1434) 2020-03-19 14:55:40 -07:00
Dmitry Gozman
ea99908bf4
fix(eval): adopt nested handles (#1430)
We were only adopting top-level handles in FrameExecutionContext. Now we do that universally.
2020-03-19 13:07:33 -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
Pavel Feldman
2af07ce475
chore: rework disposers into a frame task (#1413) 2020-03-18 20:05:35 -07:00
Dmitry Gozman
7bd924673a
fix(PageEvent): properly wait for initial navigation in chromium and webkit (#1412) 2020-03-18 17:14:18 -07:00
Joel Einbinder
b0749e3a6d
fix(docs): fixup and lint optionals and return values in api.md (#1376)
Currently in our API `?` means null, but sometimes it means optional. Linting optional/nulls with this patch is required for #1166 to land nicely.

Previously, return types were not being linted in `api.md`. This is fixed, along with many broken return types.

This patch considers `?` to mean nullable, and has some heuristics to determine optionality. I believe this to be the minimal patch needed to unblock #1166. After it lands, we can consider changing the api docs to hopefully remove some heuristics and strangeness.
2020-03-18 16:23:25 -07:00
Joel Einbinder
741e2d19d6
fix(docs): lint and fix all internal links in api.md
We have had a lot of churn in the api, which has caused a lot of our links to break.
2020-03-18 15:34:53 -07:00
Dmitry Gozman
a1929e20f5
feat(types): better types for nested handles (#1424)
References #1348.
2020-03-18 15:19:58 -07:00
Dmitry Gozman
bfcffbb377
browser(webkit): introduce Playwright.windowOpen protocol event (#1420) 2020-03-18 10:44:01 -07:00
Dmitry Gozman
dd850ada89
api(eval): allow non-toplevel handles as eval arguments (#1404) 2020-03-18 10:41:46 -07:00
Arjun Attam
045277d5cd
docs(chore): fix link in troubleshooting (#1422) 2020-03-18 09:41:52 -07:00
Yury Semikhatsky
b8e79e60c7
chore(chromium): remove obsolete target related code (#1417) 2020-03-17 22:07:20 -07:00
Pavel Feldman
049b336800
api(devices): extract isMobile/hasTouch from viewport (#1415) 2020-03-17 18:21:02 -07:00
Joel Einbinder
39e5eb7eda
feat(devices): remove name from device objects (#1414) 2020-03-17 16:04:42 -07:00
Pavel Feldman
e4225adcc0
feat(permissions): make origin optional (#1406) 2020-03-17 15:32:50 -07:00
Darío Kondratiuk
840146273e
test(web): Remove unused variable (#1410) 2020-03-17 09:05:33 -07:00
Andrey Lushnikov
a9ab9b0dc0
fix(testrunner): sourcemapify stack traces for test errors (#1409)
Fixes #1403
2020-03-17 09:04:44 -07:00
Pavel Feldman
edd2fee943
browser(firefox): grant permissions to all origins (#1405) 2020-03-16 20:57:19 -07:00
Dmitry Gozman
3960b179a1
fix(testrunner): fit.fail should run the test (#1407) 2020-03-16 19:12:52 -07:00
Dmitry Gozman
aa32d351be
fix(tests): remove flaky load event from auto-waiting tests (#1399)
We do not guarantee that click resolves before load event comes.
Theoretically, inserting two tasks before resolving load should help,
but seems like a strange contract.

Drive-by: move auto waiting tests to a separate file.
2020-03-16 18:33:39 -07:00
Pavel Feldman
64b175ce10
api(waitForLoadState): restore it (#1390) 2020-03-16 14:39:44 -07:00
Dmitry Gozman
6731d37546
api(network): replace redirectChain with redirectedFrom/redirectedTo (#1401) 2020-03-16 13:31:06 -07:00
Joel Einbinder
6dcd6a6eec
fix(types): jsHandle.getProperty should never resolve to null (#1402)
Added a test to confirm that this was dead code.
2020-03-16 13:23:04 -07:00
Andrey Lushnikov
5816ec53f7
fix(testrunner): dedup focused tests and suites by id (#1393) 2020-03-16 09:04:55 -07:00
Dmitry Gozman
e7eeefe4c7
chore(testrunner): separate expectations from run mode (#1395)
Run/Focus/Skip is orthogonal to expect to Pass/Fail/Flake.
This change separates the two, in a preparation to run Fail/Flaky tests.
2020-03-15 23:10:49 -07:00
Pavel Feldman
951126a58a
feat(chromium): roll Chromium to r750417 (#1398) 2020-03-14 19:32:26 -07:00
Pavel Feldman
e4991a1489
tests: add some failing page event tests (#1394) 2020-03-14 19:14:46 -07:00
Pavel Feldman
e692dd6e62
api(cdp): rename ChromiumSession to CDPSession (#1380) 2020-03-13 16:16:54 -07:00
Andrey Lushnikov
19dd2338d9 devops: remove verbose on WebKit Win on Github Actions 2020-03-13 14:44:54 -07:00
Dmitry Gozman
a96dec58c8
fix(webkit): emit close on pages before clearing them (#1386) 2020-03-13 14:43:49 -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
26479119b6
fix(setContent): handle inner _waitForLoadState rejection (#1382) 2020-03-13 13:09:06 -07:00
Dmitry Gozman
601d57a300
test: add a test for popup with window features (#1381) 2020-03-13 13:08:35 -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
Pavel Feldman
8aba111f1e
api(cdp): rename createSession to newCDPSession (#1378) 2020-03-13 09:00:03 -07:00
Pavel Feldman
b1a3b23c38
api(request): make request.response a promise (#1377) 2020-03-13 08:54:19 -07:00
Pavel Feldman
24d4fb1e5c
api(click): remove tripleclick, respect clickCount (#1373) 2020-03-13 08:09:48 -07:00
Pavel Feldman
8c532bd8da
api(press): remove text option (#1372)
#1348
2020-03-12 22:02:19 -07:00
Pavel Feldman
e1d3196460
api(*.selectOption): renamed from *.select (#1371) 2020-03-12 21:30:12 -07:00
Pavel Feldman
064099ab3c
api(keyboard.insertText): renamed from sendCharaters (#1370) 2020-03-12 20:56:52 -07:00