New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Puppeteer E2E test: Fix text-rendering differences #25450
base: dev
Are you sure you want to change the base?
Conversation
It doesn't really seem this change works... |
@LeviPesin gday, e2e was failing all tests on the mac after 3 mins so I took a peek. Code is pushing an Also added a Where do we tune the memory allocated for the chromium browser session ? |
Your constant for should be: const PLATFORMS = {
linux: 'linux',
mac: 'mac',
mac_arm: 'mac_arm64',
win32: 'win',
win64: 'win64'
}; See: #25395 |
To get the native mac browser and avoid slow rosetta emulation (buggy because its never tested on arm because they have arm builds) looks like you need to opt into it: const browserFetcher = new BrowserFetcher( { path: 'test/e2e/chromium', useMacOSARMBinary: true } ); After fixing the typo in the console.log( browserFetcher.platform() ); This will return |
Thank you! Will fix those errors. The problem why some examples fail in this PR (which I tried to fix but to no avail) is text rendering -- I tried using some flags and/or setting a custom font so that it overwrites the default system font but that doesn't seem to work. I will investigate more. |
Ran again with all the latest updates. 2 Mods applied, one ommitted.
Next test is all 3. Vulkan won't have much supports on the Macs. Updating this comment with the results. It's at least completing but now we have 5 errors instead of 2. Results Summary: Error Captures: |
This is strange, it should... It can be significantly below that line -- because when making a new attempt it's added to the end of the queue. |
Looks like the |
Ok. Checking logs again to confirm. You're right... it was further down. |
Forcing I have the same tests failing all runs. Hows this match up with the image updates and tolerances ? |
The examples that are failing are exactly the examples that use many text -- and the difference is exactly in text rendering. I will think more about how to solve this... |
Updated the raw test data. Is it a font thing ? I remember needing to supply fonts in a few formats to get the same look across browsers. |
The test rig is filtering web requests for the three library so it can return a version where random replaced with a fixed value to get consistent results. These examples might import from other places. Is it possible some of these could need filtering now or in the future ? {
"imports": {
"three": "../build/three.module.js",
"three/addons/": "./jsm/"
}
} |
Another one: Looks like the filtering is only doing |
The same examples fail each time. I'm going to run each example directly on the Mac and post the results. Maybe there will be a font not loaded or not compatible, some sort of message. |
There was a discussion about Math.random() filtering in #24109. I'm not very convinced it is needed (it was said there that otherwise many screenshots could break when another Math.random() is inserted before a one)... By the way, we can theoretically just set the JS random value when starting the browser (there is such a flag) and then remove the filtering and |
Half way through the Mac tests. My back was hurting so had to break from using the laptop. I'll send through the infos shortly. |
Related:
Description
Fix differences in text rendering in Puppeteer between different platforms and also regenerate some screenshots (using Chromium 109.0.5414.120 (revision 1070054, https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1070054/chrome-win.zip), stable channel on win64).