interop icon indicating copy to clipboard operation
interop copied to clipboard

Chrome test result at https://wpt.fyi/results/largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html

Open powdercloud opened this issue 3 months ago • 3 comments

Hi,

I've been trying to understand why https://wpt.fyi/results/largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html indicates a failure for Chrome. The indication there (looking at the detail of the test failure) is that there are two performance entries for the URL of the font, when we expect just one, as asserted by line 71 in the test file:

    assert_equals(performance.getEntriesByName(absoluteURL).length, 1, 'Web font should be downloaded.');

I've not been able to reproduce this failure.

I've verified the following thus far:

  • Test passes in the Chromium repository (it's not flaky in our dashboard, for any platform)
  • Test passes live here, when typing 'k' into the text field (I'm running a recent Chrome on Ubuntu).
  • With a simple pending PR against the test in this Github repository, the bots appear to pass the test. See https://github.com/web-platform-tests/wpt/pull/56113/files and https://wpt.fyi/results/largest-contentful-paint?label=pr_head&max-count=1&pr=56113

What I've also tried is to make a simple clarifying change against the test in the Chromium repo, to see if I could tickle the dashboard to update. That PR is still pending review for Github due to this test being an interop test, but even once accepted the outcome is uncertain.

I think at this point it's possible that the dashboard is displaying an incorrect result for Chrome, or there is a subtle difference in how the test runs when producing that result. Either way, I'd be grateful for some help debugging this issue. Thanks!

powdercloud avatar Dec 03 '25 08:12 powdercloud

Raw notes:

At one point, we used both Canary and Dev Channels. And the test was passing on both. https://wpt.fyi/results/?q=largest-contentful-paint%2Fweb-font-styled-text-resize-swap-after-interaction.html&run_id=5112681236791296&run_id=5154483683721216

This is the next commit where it did not pass though on Canary: https://wpt.fyi/results/largest-contentful-paint?q=largest-contentful-paint%2Fweb-font-styled-text-resize-swap-after-interaction.html&run_id=5118815389614080&run_id=5155585409941504

That commit would not influence that.

Anyhow, we eventually stopped using Dev channel and only use Canary.

Here are the logs for a recent run on Chrome Canary.

41:03.24 TEST_START: /largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html
41:03.70 pid:33767 [33784:33784:1203/190645.619142:INFO:CONSOLE:0] "A preload for 'http://web-platform.test:8000/fonts/AD.woff' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.", source: http://web-platform.test:8000/largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html (0)
41:03.79 TEST_END: Test OK. Subtests passed 0/1. Unexpected 1
FAIL LCP should be not updated if the web font styled text resize occurs after an interaction happens - assert_equals: Web font should be downloaded. expected 1 but got 2
    at Test.<anonymous> (http://web-platform.test:8000/largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html:71:5)
/largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html
  FAIL LCP should be not updated if the web font styled text resize occurs after an interaction happens - assert_equals: Web font should be downloaded. expected 1 but got 2
    at Test.<anonymous> (http://web-platform.test:8000/largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html:71:5)

Next steps, compare the logs for a run on a passing browser.

jcscottiii avatar Dec 03 '25 22:12 jcscottiii

More raw notes:

The logs for the same test SHA running on Firefox.

https://community-tc.services.mozilla.com/tasks/CEz6-Q-MQ2-BDTXdPNmB7A/runs/0/logs/live/public/logs/live.log#L34003

51:15.67 TEST_START: /largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html
51:15.67 INFO Closing window d7c5ba1e-d248-4d30-835a-0eb5a5d6f072
51:16.39 TEST_END: Test OK. Subtests passed 1/1. Unexpected 0

So it looks like something with the credentials mode when running the test in Chrome, it does not like the cross origin if we are looking at the logs from my previous comment. That line is surfaced by Chrome here: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc;l=1953-1956;drc=aef3061376f1a0a6ec30d28eafb842ab712e697c

jcscottiii avatar Dec 04 '25 00:12 jcscottiii

I can get a repro.

When I run the following command: ./wpt run --channel=canary --enable-swiftshader --install-browser --install-webdriver --install-fonts --no-headless chrome largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html

The browser will pop up and pass the first time like so:

Image

If I:

  • refresh the page and type "k"
  • then refresh the page again and type k it fails and I get the same warning I saw in the console in the logs.
Image

And I see the font loaded twice

Image

First font loaded

Image

Second font loaded

Image

Other details:

Image

The warning itself is not the problem. But we are indeed loading the font twice (which is the failing assertion). Not sure why though.

jcscottiii avatar Dec 04 '25 01:12 jcscottiii

These tests are no longer part of Interop 2026; please feel free to make changes through the wpt PR process as normal.

jgraham avatar Feb 12 '26 17:02 jgraham