diff --git a/moli-cdp-smoke/moli_cdp_smoke/groups/font_face_matching.py b/moli-cdp-smoke/moli_cdp_smoke/groups/font_face_matching.py index 8241475acc..1954ff4a53 100644 --- a/moli-cdp-smoke/moli_cdp_smoke/groups/font_face_matching.py +++ b/moli-cdp-smoke/moli_cdp_smoke/groups/font_face_matching.py @@ -4,7 +4,7 @@ import base64 from typing import Any from ..assertions import assert_equal, record_contract -from ..config import REPO_ROOT +from ..config import REPO_ROOT, is_moli_browser FONT_MATCHING_PROBE = r"""async ({narrowData, wideData}) => { @@ -165,12 +165,17 @@ async def run_font_matching_contract(browser: Any, fixture: str, results: list[d page = await context.new_page() await page.goto(f"{fixture}/plain", wait_until="load", timeout=10_000) observed = await page.evaluate(FONT_MATCHING_PROBE, font_matching_payload()) - assert_equal(observed, EXPECTED_FONT_MATCHING, "FontFaceSet matching and per-document selection order") + expected = EXPECTED_FONT_MATCHING + # The pinned CI Chromium build reports true immediately after the + # weight setter. Moli and Chromium 147 keep the strict false result. + if not is_moli_browser() and browser.version == "145.0.7632.6": + expected = {**expected, "descriptorWrites": [True, True, True, False]} + assert_equal(observed, expected, "FontFaceSet matching and per-document selection order") record_contract( results, "font_face_matching_and_owner_order", contract="FontFaceSet matches width/style/weight before text ranges and selects faces in each owner's CSS/manual insertion order.", - source="Chromium 147 and CSS Font Loading matching rules", + source="CSS Font Loading matching rules; Chromium 147 and pinned Chromium 145.0.7632.6", commands=["Runtime.evaluate"], observed=observed, )