-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(font-display): do not use invalid sourceURLs #8535
Conversation
Actually, the custom URL was set manually. See #8534 (comment):
|
Thanks @westonruter! Updated accordingly :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with possible test request
@@ -231,6 +231,8 @@ describe('Performance: Font Display audit', () => { | |||
}); | |||
|
|||
it('handles varied font-display declarations', async () => { | |||
// Make sure we don't use sourceURL when it's not a valid URL, see https://github.com/GoogleChrome/lighthouse/issues/8534 | |||
stylesheet.header.sourceURL = 'custom-attribute'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any chance you could split this off into its own test? I could see us revising font-display
at some point and having to reconfigure the tests and losing this very important line :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure :)
Summary
Apparently
/*# sourceURL=custom-url.css */
sets thesourceURL
in DevTools to whatever the attribute was, so we should handle that case.Related Issues/PRs
fixes #8534