e2e: the stock twin runs headed, in the mode of ours (a real window on the display of the job), not in Firefox's headless mode

This commit is contained in:
feder-cr committed 2026-11-28 21:36:40 +01:00
1 parent 9140845e4d
commit 5298149cd0
1 file changed
+2 -2
+2 -2
View File
@@ -9,7 +9,7 @@ HOW STOCK RUNS. The mechanism is the one of the fake web (``scripts/run_fakeweb.
archives, checked against ``ci/py-lock/playwright-browsers.json``. Stock goes FIRST and is closed before ours starts (ci-release-18: one browser at a time). The stock
part runs in a thread of its own (a sync client keeps its loop marked as running in its thread, and ours is a sync client too).
THE SAME WINDOW. Stock is launched headless with the display scale of the case as ``layout.css.devPixelsPerPx`` (the pref ours is launched with for the same case: the scale
THE SAME WINDOW. Stock is launched HEADED (``headless=False``: a real window on the display of the job, Xvfb on Linux and the desktop on Windows), as ours is (``launch_case``: the wrapper gives the engine a display of its own, so its windows are real ones; Firefox's ``-headless`` mode is on neither, because popups, drag and drop and window geometry behave differently in it), with the display scale of the case as ``layout.css.devPixelsPerPx`` (the pref ours is launched with for the same case: the scale
is then the one of the page AND of the browser chrome) and a context viewport of the inner size retail reads at that case (``RETAIL_CASES``: the maximized window's
``innerWidth`` x ``innerHeight``). Ours is the maximized window of the same case (``_window_origin.launch_case``).
@@ -90,7 +90,7 @@ def _on_stock(case: str, measure: Callable[[Any, Chrome], Dict[str, Any]]) -> Di
def run() -> Dict[str, Any]:
sync_playwright = stock_client()
with sync_playwright() as p:
browser = p.firefox.launch(headless=True, args=MARIONETTE_ARGS,
browser = p.firefox.launch(headless=False, args=MARIONETTE_ARGS,
firefox_user_prefs={"layout.css.devPixelsPerPx": CASES[case][0], "marionette.port": 0})
chrome = None
try: