-
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
Adds auto-requested geolocation audit #510
Conversation
@@ -76,3 +76,6 @@ Artifacts.prototype.Speedline; | |||
|
|||
/** @type {{scrollWidth: number, viewportWidth: number}} */ | |||
Artifacts.prototype.ContentWidth; | |||
|
|||
/** @type {boolean} */ | |||
Artifacts.prototype.Geolocation; |
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.
more descriptive name for this? GeolocationOnStartup
or something?
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.
reviewed! |
Rebased and comments addressed. PTAL. |
This wfm, but will defer to brendan |
* represents a poor user experience, since it lacks context. As such, if the page requests | ||
* geolocation the gatherer will intercept the call and mark a boolean flag to true. The audit that | ||
* corresponds with this gatherer then checks for the flag. | ||
* @author Paul Lewis |
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.
lulz
🌏 🌍 🔭 🚫 |
} | ||
|
||
function collectGeoState() { | ||
__returnResults(window.__didNotCallGeo); |
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.
@paullewis: fyi, @paulirish removed the timeout in the last commit since evaluateAsync
is already async and afterPass
should only be called once all possible load listeners are called. Should automatically cover any expanded trace time when/if we extend the tracing time to e.g. better test TTI
Ref: https://developers.google.com/web/fundamentals/getting-started/principles/usability-and-form-factor?hl=en#be-clear-why-you-need-a-users-location
This adds an audit for pages that automatically request geolocation on load. It's a proto for
getUserMedia
and push messages, both of which should also not be requested outside of user interactions.