Repository navigation
v0.50.1
0.50.0 was tagged and never published: its end-to-end gate was red on two tests that counted processes.
0.50.1 is 0.50.0 with those tests corrected.
Changed
- Engine firefox-62 through invisible-core 62.63.0, which this version pins: firefox-61 plus Fission
and the Juggler for frames in another process. Whengotoreturns, the frames below have the
address of their first document (an iframe of another site used to be listed with an empty url
for a moment); agototo the address the page is already at ends; a late event of a frame that
left the page no longer brings it back intopage.frames. - Fission: iframes of another site run in a content process of their own (isolation strategy 1,
fission.autostarton, four isolated content processes), as in retail Firefox on desktop. The
strategy comes from the invisible-core baseline of the firefox-62 engine, whose Juggler reaches a
frame in another process like any other. The tests that held strategy 0
(tests/test_cross_origin_iframe.py) now hold strategy 1, and the Fission end-to-end tests
(frame tree, element to frame, geometry, input, crash of an iframe process, identity of the
iframe and of its page) run on that engine.
Fixed
goto(wait_until="networkidle")arrives on a page that is reused for many addresses, and on a served browser whose
context routes every request, as with a stock Firefox. Two causes, both ours. A route answered after the browser had
already closed its request (a fetch the page aborted, an image it replaced, an iframe it removed, a beacon cancelled
with its document) came back to the client as an error, which the client kept for the whole connection and raised on the
next route command; that command was never sent, its request stayed held in the engine, and so on down the page. The
server now takes such an answer as done, whatever wording the engine gives it ("Cannot find request", or "NS_BINDING_ABORTED"
when the channel was cancelled while the answer was on its way), as Playwright's own server does. The same defect was found a month earlier by richardpowellus
(#351), on the favicon of the page agotohad just left; his test is part of this release. And the core counted the requests in flight
with one integer per page, never reset by a navigation, so one request whose end never arrived kept every later address
from going idle (invisible-core 62.64.0 keeps them by request id, per document, and does not keep the requests of a
frame that already left: a beacon sent atpagehideis announced after its frame is gone).- A
gotosent right afternew_pageis no longer "interrupted by another navigation to about:blank" on a loaded machine. The page was
handed to the caller as soon as its main frame was announced, while the engine had not yet committed the page's own initial
about:blank; a navigation answered before that commit lost to it. The page is now handed over when the engine says it is
ready (Page.ready), as Playwright's own page is (invisible-core 62.65.0,Lifecycle.wait_for_page_ready; a page closed before
it was ready ends the wait with an error at once). - A launch that names no session (Playwright's own
BrowserType.launchagainst the server) gets a
session composed the wayInvisiblePlaywright()composes one: prefs, environment and, behind a
proxy, the egress the page reads as its WebRTC address. It used to come up with Mozilla's
defaults, and on Linux its firstnew_pagefailed with "Unexpected number of tabs in the new
window: 2". - A frame that left the page (an iframe a script removed) answers a call with "Frame was
detached", as Playwright does, not "Target page, context or browser has been closed". grant_permissionsuses the permission names of the engine.geolocationandnotificationsused
to reach the engine under the web names while it keeps a grant undergeoand
desktop-notification, so a page of a context that had been granted geolocation and given a
position was still denied. The names are those of the Playwright client for this browser
(geolocation,persistent-storage,push,notifications,screen-wake-lock); any other name
raisesUnknown permission, as it does there, and a grant with no origin is a grant for every
origin.- The end-to-end tests that count content processes count the ones that host a site, not every content
process that is new. The engine keeps a pool of preallocated processes and refills it whenever it gets
to it, so a refill landing between two reads looked like a process the test had caused (a same-site
frame, a closed context with a service worker that never stops). Measured on firefox-62: a closed context
leaves no process of its site. On Linux the process is named by the site it hosts; elsewhere these
tests skip.