-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Load Ahem as a web font in css-shapes tests. #19577
Load Ahem as a web font in css-shapes tests. #19577
Conversation
Also make font setup/restoration explicit rather than per-subtest. This allows us to setup Ahem usage, then wait for fonts to load, and then run all computed tests as a discrete block. The previous method (which dynamically inserted Ahem prior to a subtest and removed it immediately after) didn't allow us to wait for the web fonts to be loaded because the test page would have no Ahem usage present at the time we waited for the fonts.ready event.
@foolip Hoping to get a sanity check on this approach before diving into inlining a bunch more tests -- thoughts? |
Looks reasonable, but you might also find the people who wrote/reviewed these tests and ask for their feedback before doing it to a lot of tests. |
@LukeZielinski what's the motivation for inlining? Would it be possible to get the Ahem improvements while still using generate_tests? |
changes to font setup
@astearns The motivation to inline was that generate_tests is deprecated, and it helped in debugging what the problem with these tests were. I've combined font setup changes with generate_tests and it seems to work, and it does appear cleaner this way. @foolip I don't recall why generate_tests got deprecated but unless there are concerns I'll probably move forward with this combination. |
Thanks! I think it's much more readable and maintainable this way. Looks like there's a preferred way of doing data-driven tests:
Now that you've improved the Ahem situation, we can probably leave the generate_tests usage in until/unless we see a new problem in running these tests. |
Oops, should have read my own link! Ok, I'll move ahead with updating the rest of the tests in this directory. Thanks. |
For the record, this PR only updates a handful of css-shapes tests. These are ones that were either broken by the parsing-utils.js change in this PR, or identified as regressions when running all tests with --install-fonts disabled (eg: firefox regressions) |
This makes font setup/restoration explicit rather than per-subtest.
This allows us to setup Ahem usage, then wait for fonts to load, and
then run all computed tests as a discrete block.
The previous method (which dynamically inserted Ahem prior to a subtest
and removed it immediately after) didn't allow us to wait for the web
fonts to be loaded because the test page would have no Ahem usage
present at the time we waited for the fonts.ready event.