0.35.5: firefox-43 (invisible-core 43.39.0) (#341)
The pin moves to invisible-core 43.39.0, which seals the firefox-43 engine. - **A page's frames stay in `page.frames` after a few navigations in one tab.** The engine reported the iframes of the page being loaded as detached once the back-forward cache let an older page of the tab go, so `page.frames` missed them and a `frame_locator` into them waited until its timeout. The new e2e test (five pages in a row, then a page with nested frames) fails on firefox-42 with no child frames and passes on firefox-43 with all three. - **On Linux, AAC is answered as on Windows** (the declaration is in the core): `canPlayType` and `MediaSource.isTypeSupported` for audio/mp4, audio/aac, audio/x-m4a and video/mp4 with mp4a.40.2 used to drop to "" after about 300 ms on a host without its own AAC decoder. e2e on firefox-43 with core 43.39.0: Windows 373 passed, 5 skipped; Linux 374 passed, 4 skipped; no reruns.
This commit is contained in:
1 parent
70285c5bc3
commit
857de63b48
3 files changed
+84
-2
No files matched your search
@@ -6,6 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.35.5] - 2026-10-13
|
||||
|
||||
The pin moves to invisible-core 43.39.0, which seals the firefox-43 engine.
|
||||
|
||||
### Fixed
|
||||
- **A page's frames stay in `page.frames` after a few navigations in one
|
||||
tab.** The engine reported the iframes of the page being loaded as
|
||||
detached while it loaded them, once the back-forward cache let an older
|
||||
page of the tab go: `page.frames` missed them and a `frame_locator` into
|
||||
them waited until its timeout. Measured with five pages in a row: none of
|
||||
the three frames of the fifth before, all three now.
|
||||
- **On Linux, AAC is answered as on Windows.** `canPlayType` and
|
||||
`MediaSource.isTypeSupported` of `audio/mp4`, `audio/aac`, `audio/x-m4a`
|
||||
and `video/mp4; codecs="mp4a.40.2"` answered "maybe" at first and then
|
||||
nothing from about 300 ms on, on a host without its own AAC decoder, while
|
||||
H.264 stayed "probably": no Windows Firefox answers that. They now answer
|
||||
what Windows does, "maybe", "maybe", "maybe" and "probably", with
|
||||
MediaSource true, false, false, true. A Linux host without an AAC decoder
|
||||
still cannot play the audio.
|
||||
|
||||
## [0.35.4] - 2026-10-13
|
||||
|
||||
The pin moves to invisible-core 42.39.0, which seals the firefox-42 engine.
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "invisible_playwright"
|
||||
version = "0.35.4"
|
||||
version = "0.35.5"
|
||||
description = "Playwright wrapper for a patched Firefox with deterministic stealth profile."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
@@ -69,7 +69,7 @@ dependencies = [
|
||||
# metadata; nothing in src/ hardcodes a second copy (tests/test_core_pin.py
|
||||
# fails if one appears). What stays invisible to install-time machinery is the
|
||||
# --no-deps / lockfile residue, and _pin.py is the only layer that sees it.
|
||||
"invisible_core==42.39.0",
|
||||
"invisible_core==43.39.0",
|
||||
# ⛔ playwright is NO LONGER a dependency: since the full fork, the Python
|
||||
# client lives in src/invisible_playwright/_pw/ and the Node driver in
|
||||
# src/invisible_playwright/_driver/. Reintroducing it would not visibly
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
"""A page's frames stay in `page.frames` after a few navigations in one tab.
|
||||
|
||||
The engine used to report the iframes of the page being loaded as detached
|
||||
while it loaded them: with the back-forward cache in the parent each
|
||||
navigation gives the tab a new top-level browsing context, and when the cache
|
||||
let an old one go, the engine took it for the current main frame and
|
||||
detached all its children. Measured on firefox-42 with this history: 0 child
|
||||
frames where there are 3. Fixed in firefox-43 (70-known-bugs [B292] in the
|
||||
workbench).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import http.server
|
||||
import threading
|
||||
|
||||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.e2e
|
||||
|
||||
PAGES = {
|
||||
"/framed": b"<!doctype html><title>fr</title>"
|
||||
b"<iframe src=/plain></iframe><iframe src=/other></iframe>",
|
||||
"/nested": b"<!doctype html><iframe src=/framed></iframe>",
|
||||
"/shadow": b"<!doctype html><div id=h></div><iframe src=/plain></iframe><script>"
|
||||
b"document.getElementById('h').attachShadow({mode: 'open'}).innerHTML ="
|
||||
b" '<iframe src=/other></iframe>';</script>",
|
||||
}
|
||||
PLAIN = b"<!doctype html><title>plain</title><p>plain</p>"
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def site():
|
||||
class H(http.server.BaseHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
body = PAGES.get(self.path, PLAIN)
|
||||
self.send_response(200)
|
||||
self.send_header("Content-Type", "text/html; charset=utf-8")
|
||||
self.send_header("Content-Length", str(len(body)))
|
||||
self.end_headers()
|
||||
self.wfile.write(body)
|
||||
|
||||
def log_message(self, *a):
|
||||
pass
|
||||
|
||||
srv = http.server.ThreadingHTTPServer(("127.0.0.1", 0), H)
|
||||
srv.daemon_threads = True
|
||||
threading.Thread(target=srv.serve_forever, daemon=True).start()
|
||||
yield "http://127.0.0.1:%d/" % srv.server_address[1]
|
||||
srv.shutdown()
|
||||
|
||||
|
||||
def test_the_frames_of_a_page_outlive_an_old_entry_leaving_the_cache(firefox_binary, site):
|
||||
from invisible_playwright import InvisiblePlaywright
|
||||
|
||||
with InvisiblePlaywright(seed=4292, binary_path=firefox_binary, headless=True) as browser:
|
||||
page = browser.new_page()
|
||||
for path in ("", "framed", "shadow", ""):
|
||||
page.goto(site + path)
|
||||
page.goto(site + "nested")
|
||||
urls = sorted(f.url.rsplit("/", 1)[-1] for f in page.frames if f != page.main_frame)
|
||||
assert urls == ["framed", "other", "plain"]
|
||||
assert page.frame_locator("iframe").frame_locator("iframe").first.locator("p").inner_text() == "plain"
|
||||
Reference in new issue
Block a user