From 62de4fc9abc8067fb58378999b1bc4a4c42f9eb5 Mon Sep 17 00:00:00 2001 From: Gregory Mierzwinski Date: Mon, 13 Nov 2023 10:51:37 -0500 Subject: [PATCH] Gather LargestContentfulPaint in Firefox. (#2018) * Gather LargestContentfulPaint in Firefox. * Fix lint issue. * Use googleWebVitals entry instead of a new one. --- lib/firefox/webdriver/firefox.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/firefox/webdriver/firefox.js b/lib/firefox/webdriver/firefox.js index 9960d24fe6..ae05e40211 100644 --- a/lib/firefox/webdriver/firefox.js +++ b/lib/firefox/webdriver/firefox.js @@ -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) {