Skip to content

Commit

Permalink
Gather LargestContentfulPaint in Firefox. (#2018)
Browse files Browse the repository at this point in the history
* Gather LargestContentfulPaint in Firefox.

* Fix lint issue.

* Use googleWebVitals entry instead of a new one.
  • Loading branch information
gmierz authored Nov 13, 2023
1 parent 6afb20f commit 62de4fc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/firefox/webdriver/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,16 @@ export class Firefox {
if (this.appConstants) {
result.browserScripts.browser.appConstants = this.appConstants;
}

result.googleWebVitals = {};
if (
result.browserScripts.timings &&
result.browserScripts.timings.largestContentfulPaint
) {
result.googleWebVitals.largestContentfulPaint =
result.browserScripts.timings.largestContentfulPaint.renderTime ||
result.browserScripts.timings.largestContentfulPaint.loadTime;
}
}

async postWork(index, results) {
Expand Down

0 comments on commit 62de4fc

Please sign in to comment.