-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Rewrite chrome URLs to compare them. #1777
Conversation
@tommycli can you review? |
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. I'm assuming you manually tested this with chrome --disable-features=MaterialDesignSettings to confirm that it fails without this patch and works with this patch?
Btw, I don't think I'm a valid reviewer. |
lighthouse-core/lib/url-shim.js
Outdated
// As a result, the final document URL doesn't match the URL that network layer surfaces. | ||
function rewriteChromeInternalUrl(url) { | ||
if (!url.startsWith('chrome://')) return url; | ||
return url.replace(/^chrome:\/\/chrome\//, 'chrome://'); |
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.
it't not clear from your description that it uses chrome:chrome
urls. Might want to update the summary.
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.
good call. you got it.
fixes #1776