-
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
Geolocation audit now returns unknown if page already had granted permission #925
Conversation
The debug boxes look like 💩 . I'm not 😄 with them. Let me tweak a bit, but you guys can look over the code changes. |
Sounds good. Can the new stuff be sure to do something with the |
Slight update: I know #926 is in the works so I'll roll out the style changes. |
@paulirish removed the report changes. Ready. |
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.
a few questions but nothing blocking.
|
||
/* istanbul ignore next */ | ||
function queryGeolocationPermission() { | ||
return navigator.permissions.query({name: 'geolocation'}).then(result => { |
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.
thats very cool. do we need to do a feature detect before using this or are we safe?
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.
safe. chrome has had the permission api since 43
@@ -33,6 +33,17 @@ describe('UX: geolocation audit', () => { | |||
assert.ok(auditResult.debugString); | |||
}); | |||
|
|||
it('prints debugString information when present', () => { |
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.
"prints debugString info if present in artifact"
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.
done
R: @brendankenny @paulirish @GoogleChrome/lighthouse
This also adds
debugString
support to the audit if it specifies one: