Repository: GoogleChrome/lighthouse (js)

Issue:
No domContentLoaded event in trace
I'm using lighthouse for automatic page test, and I've encountered this warning, which makes the performance score very slow, could anyone help to figure out why is this happening?

```
~/dev/node-test/chrome lighthouse https://h5.m.taobao.com/trip/home/index.html
  ChromeLauncher Waiting for browser. +0ms
  ChromeLauncher Waiting for browser... +1ms
  ChromeLauncher Waiting for browser..... +515ms
  ChromeLauncher Waiting for browser.....✓ +4ms
  status Initializing… +770ms
  status Loading page & waiting for onload URL, Viewport, ViewportDimensions, ThemeColor, Manifest, ChromeConsoleMessages, ImageUsage, Accessibility, EventListeners, AnchorsWithNoRelNoopener, AppCacheManifest, DOMStats, JSLibraries, OptimizedImages, PasswordInputsWithPreventedPaste, ResponseCompression, TagsBlockingFirstPaint, WebSQL +346ms
  statusEnd Loading page & waiting for onload +14s
  status Retrieving trace +1ms
  status Retrieving devtoolsLog and network records +2s
  status Retrieving: URL +14ms
  status Retrieving: Viewport +1ms
  status Retrieving: ViewportDimensions +5ms
  status Retrieving: ThemeColor +6ms
  status Retrieving: Manifest +2ms
  status Retrieving: ChromeConsoleMessages +1ms
  status Retrieving: ImageUsage +2ms
  status Retrieving: Accessibility +59ms
  status Retrieving: EventListeners +262ms
  status Retrieving: AnchorsWithNoRelNoopener +230ms
  status Retrieving: AppCacheManifest +2ms
  status Retrieving: DOMStats +3ms
  status Retrieving: JSLibraries +15ms
  status Retrieving: OptimizedImages +9ms
  status Retrieving: PasswordInputsWithPreventedPaste +161ms
  status Retrieving: ResponseCompression +2ms
  status Retrieving: TagsBlockingFirstPaint +6ms
  status Retrieving: WebSQL +4ms
  status Loading page & waiting for onload ServiceWorker, Offline, StartUrl +811ms
  statusEnd Loading page & waiting for onload +230ms
  status Retrieving devtoolsLog and network records +47ms
  status Retrieving: ServiceWorker +7ms
  status Retrieving: Offline +0ms
  status Retrieving: StartUrl +34ms
  status Loading page & waiting for onload HTTPRedirect, HTMLWithoutJavaScript +333ms
  statusEnd Loading page & waiting for onload +179ms
  status Retrieving devtoolsLog and network records +0ms
  status Retrieving: HTTPRedirect +6ms
  status Retrieving: HTMLWithoutJavaScript +7ms
  status Disconnecting from browser... +5ms
  status Analyzing and running audits... +30ms
  status Evaluating: Uses HTTPS +0ms
  status Evaluating: Redirects HTTP traffic to HTTPS +8ms
  status Evaluating: Registers a service worker +1ms
  status Evaluating: Responds with a 200 when offline +0ms
  status Evaluating: Has a `<meta name="viewport">` tag with `width` or `initial-scale` +1ms
  status Evaluating: Contains some content when JavaScript is not available +2ms
  status Evaluating: First meaningful paint +1ms
  status Evaluating: Page load is fast enough on 3G +125ms
  load-fast-enough-for-pwa:warn Caught exception: No domContentLoaded event in trace +34ms
  status Evaluating: Perceptual Speed Index +0ms
  status Evaluating: Screenshot Thumbnails +2s
  status Evaluating: Estimated Input Latency +187ms
  status Evaluating: No browser errors logged to the console +5ms
  status Evaluating: Keep server response times low (TTFB) +1ms
  status Evaluating: First Interactive (beta) +1ms
  first-interactive:warn Caught exception: No domContentLoaded event in trace +0ms
  status Evaluating: Consistently Interactive (beta) +0ms
  consistently-interactive:warn Caught exception: No domContentLoaded found in trace. +0ms
  status Evaluating: User Timing marks and measures +0ms
  status Evaluating: Critical Request Chains +11ms
  status Evaluating: User can be prompted to Install the Web App +3ms
  status Evaluating: Configured for a custom splash screen +1ms
  status Evaluating: Address bar matches brand colors +0ms
  status Evaluating: Manifest's `short_name` won't be truncated when displayed on homescreen +0ms
  status Evaluating: Content is sized correctly for the viewport +1ms
  status Evaluating: Uses Images with appropriate aspect ratio +0ms
  status Evaluating: Avoids deprecated APIs +2ms
  status Evaluating: Site works cross-browser +0ms
  status Evaluating: Page transitions don't feel like they block on the network +0ms
  status Evaluating: Each page has a URL +0ms
  status Evaluating: `[accesskey]` values are unique. +0ms
  status Evaluating: `[aria-*]` attributes match their roles. +1ms
  status Evaluating: `[role]`s have all required `[aria-*]` attributes. +0ms
  status Evaluating: Elements with `[role]` that require specific children `[role]`s, are present. +0ms
  status Evaluating: `[role]`s are contained by their required parent element. +0ms
  status Evaluating: `[role]` values are valid. +0ms
  status Evaluating: `[aria-*]` attributes have valid values. +0ms
  status Evaluating: `[aria-*]` attributes are valid and not misspelled. +0ms
  status Evaluating: `<audio>` elements contain a `<track>` element with `[kind="captions"]`. +0ms
  status Evaluating: Buttons have an accessible name. +0ms
  status Evaluating: The page contains a heading, skip link, or landmark region. +1ms
  status Evaluating: Background and foreground colors have a sufficient contrast ratio. +0ms
  status Evaluating: `<dl>`'s contain only properly-ordered `<dt>` and `<dd>` groups, `<script>` or `<template>` elements. +0ms
  status Evaluating: Definition list items are wrapped in `<dl>` elements. +0ms
  status Evaluating: Document has a `<title>` element. +0ms
  status Evaluating: `[id]` attributes on the page are unique. +0ms
  status Evaluating: `<frame>` or `<iframe>` elements have a title. +0ms
  status Evaluating: `<html>` element has a `[lang]` attribute. +0ms
  status Evaluating: `<html>` element has a valid value for its `[lang]` attribute. +0ms
  status Evaluating: Image elements have `[alt]` attributes. +0ms
  status Evaluating: `<input type="image">` elements have `[alt]` text. +1ms
  status Evaluating: Form elements have associated labels. +0ms
  status Evaluating: Presentational `<table>` elements avoid using `<th>`, `<caption>` or the `[summary]` attribute. +0ms
  status Evaluating: Links have a discernible name. +0ms
  status Evaluating: Lists contain only `<li>` elements and script supporting elements (`<script>` and `<template>`). +0ms
  status Evaluating: List items (`<li>`) are contained within `<ul>` or `<ol>` parent elements. +0ms
  status Evaluating: The document does not use `<meta http-equiv="refresh">`. +0ms
  status Evaluating: `[user-scalable="no"]` is not used in the `<meta name="viewport">` element and the `[maximum-scale]` attribute is not less than 5. +1ms
  status Evaluating: `<object>` elements have `[alt]` text. +0ms
  status Evaluating: No element has a `[tabindex]` value greater than 0. +0ms
  status Evaluating: Cells in a `<table>` element that use the `[headers]` attribute only refer to other cells of that same table. +0ms
  status Evaluating: `<th>` elements and elements with `[role="columnheader"/"rowheader"]` have data cells they describe. +0ms
  status Evaluating: `[lang]` attributes have a valid value. +0ms
  status Evaluating: `<video>` elements contain a `<track>` element with `[kind="captions"]`. +0ms
  status Evaluating: `<video>` elements contain a `<track>` element with `[kind="description"]`. +0ms
  status Evaluating: Avoids enormous network payloads +0ms
  status Evaluating: Offscreen images +7ms
  offscreen-images:warn Caught exception: No domContentLoaded event in trace +24ms
  status Evaluating: Serve images as WebP +0ms
  status Evaluating: Optimize images +1ms
  status Evaluating: Enable text compression +1ms
  status Evaluating: Properly size images +0ms
  status Evaluating: Avoids Application Cache +17ms
  status Evaluating: Avoids an excessive DOM size +0ms
  status Evaluating: Opens external anchors using `rel="noopener"` +2ms
  status Evaluating: Avoids requesting the geolocation permission on page load +0ms
  status Evaluating: Reduce render-blocking stylesheets +1ms
  status Evaluating: Avoids `document.write()` +0ms
  status Evaluating: Avoids Mutation Events in its own scripts +1ms
  status Evaluating: Avoids front-end JavaScript libraries with known security vulnerabilities +71ms
  status Evaluating: Avoids WebSQL DB +0ms
  status Evaluating: Avoids requesting the notification permission on page load +1ms
  status Evaluating: Allows users to paste into password fields +0ms
  status Evaluating: Reduce render-blocking scripts +0ms
  status Evaluating: Uses HTTP/2 for its own resources +0ms
  status Evaluating: Uses passive listeners to improve scrolling performance +2ms
  status Generating results... +1ms
  Printer domhtml output written to /Users/dickeylth/dev/node-test/chrome/h5.m.taobao.com_2017-11-17_17-15-36.report.html +20ms
  CLI Protip: Run lighthouse with `--view` to immediately open the HTML report in your browser +0ms
  ChromeLauncher Killing Chrome instance 93287 +1ms
```

You could see there's

```
  load-fast-enough-for-pwa:warn Caught exception: No domContentLoaded event in trace +34ms
  first-interactive:warn Caught exception: No domContentLoaded event in trace +0ms
  consistently-interactive:warn Caught exception: No domContentLoaded found in trace. +0ms
  offscreen-images:warn Caught exception: No domContentLoaded event in trace +24ms
```

and the score is really slow:

<img width="839" alt="2017-11-17_17-18-25" src="https://user-images.githubusercontent.com/2196373/32939741-7a2823b0-cbbb-11e7-9e99-2a7115e35879.png">


which could not reflect the real performance in my opinion.

Looking forward to any help! Thank you.

Pull request:
core(trace-of-tab): only use navstart of chrome/http documents
**Summary**
The underlying issue in #3838 is that we use the navstart of a navigation that is immediately cancelled and never takes place. Thus, we end up looking for all of our events of importance in the wrong timeframe.

The redirect comment (https://github.com/GoogleChrome/lighthouse/issues/3838#issuecomment-377514597) got me thinking about the correct navstart to be using though, and it seems like we should be capturing that performance hit and warning folks that they have multiple navigations. I wrote out a nice long argument for why we should do this, but I couldn't even convince myself it was the right thing to do since we'll break many existing customers that are ignorant of client-side redirects today.

Instead I've installed a quick fix that ignores navigations to targets that we're not interested in. i.e. only HTTP navigationStart events count. This fixes the taobao case and should fix the other custom protocol cases where this has popped up.

**Related Issues/PRs**
fixes #3838 


Patch:
diff --git a/docs/puppeteer.md b/docs/puppeteer.md
index a57f28dad..95547832a 100644
--- a/docs/puppeteer.md
+++ b/docs/puppeteer.md
@@ -16,8 +16,11 @@ const {URL} = require('url');
 (async() => {
 const url = 'https://www.chromestatus.com/features';
 
-// Use Puppeteer to launch Chrome. appMode launches headful chrome and doesn't size the viewport.
-const browser = await puppeteer.launch({appMode: true});
+// Use Puppeteer to launch headful Chrome and don't use its default 800x600 viewport.
+const browser = await puppeteer.launch({
+  headless: false,
+  defaultViewport: null,
+});
 
 // Wait for Lighthouse to open url, then customize network conditions.
 // Note: this will re-establish these conditions when LH reloads the page. Think that's ok....
diff --git a/lighthouse-core/audits/bootup-time.js b/lighthouse-core/audits/bootup-time.js
index af59b138f..f86e89baa 100644
--- a/lighthouse-core/audits/bootup-time.js
+++ b/lighthouse-core/audits/bootup-time.js
@@ -176,7 +176,8 @@ class BootupTime extends Audit {
     return {
       score,
       rawValue: totalBootupTime,
-      displayValue: totalBootupTime > 0 ? str_(i18n.UIStrings.ms, {timeInMs: totalBootupTime}) : '',
+      displayValue: totalBootupTime > 0 ?
+        str_(i18n.UIStrings.seconds, {timeInMs: totalBootupTime}) : '',
       details,
     };
   }
diff --git a/lighthouse-core/audits/mainthread-work-breakdown.js b/lighthouse-core/audits/mainthread-work-breakdown.js
index 4ec93e078..80f2d9405 100644
--- a/lighthouse-core/audits/mainthread-work-breakdown.js
+++ b/lighthouse-core/audits/mainthread-work-breakdown.js
@@ -121,7 +121,7 @@ class MainThreadWorkBreakdown extends Audit {
     return {
       score,
       rawValue: totalExecutionTime,
-      displayValue: str_(i18n.UIStrings.ms, {timeInMs: totalExecutionTime}),
+      displayValue: str_(i18n.UIStrings.seconds, {timeInMs: totalExecutionTime}),
       details: tableDetails,
     };
   }
diff --git a/lighthouse-core/audits/metrics/first-contentful-paint.js b/lighthouse-core/audits/metrics/first-contentful-paint.js
index c299f4392..da0ee6f24 100644
--- a/lighthouse-core/audits/metrics/first-contentful-paint.js
+++ b/lighthouse-core/audits/metrics/first-contentful-paint.js
@@ -63,7 +63,7 @@ class FirstContentfulPaint extends Audit {
         context.options.scoreMedian
       ),
       rawValue: metricResult.timing,
-      displayValue: str_(i18n.UIStrings.ms, {timeInMs: metricResult.timing}),
+      displayValue: str_(i18n.UIStrings.seconds, {timeInMs: metricResult.timing}),
     };
   }
 }
diff --git a/lighthouse-core/audits/metrics/first-cpu-idle.js b/lighthouse-core/audits/metrics/first-cpu-idle.js
index 26e75df7d..92824a1f2 100644
--- a/lighthouse-core/audits/metrics/first-cpu-idle.js
+++ b/lighthouse-core/audits/metrics/first-cpu-idle.js
@@ -67,7 +67,7 @@ class FirstCPUIdle extends Audit {
         context.options.scoreMedian
       ),
       rawValue: metricResult.timing,
-      displayValue: str_(i18n.UIStrings.ms, {timeInMs: metricResult.timing}),
+      displayValue: str_(i18n.UIStrings.seconds, {timeInMs: metricResult.timing}),
     };
   }
 }
diff --git a/lighthouse-core/audits/metrics/first-meaningful-paint.js b/lighthouse-core/audits/metrics/first-meaningful-paint.js
index 4a46fbe33..ce7f79954 100644
--- a/lighthouse-core/audits/metrics/first-meaningful-paint.js
+++ b/lighthouse-core/audits/metrics/first-meaningful-paint.js
@@ -66,7 +66,7 @@ class FirstMeaningfulPaint extends Audit {
         context.options.scoreMedian
       ),
       rawValue: metricResult.timing,
-      displayValue: str_(i18n.UIStrings.ms, {timeInMs: metricResult.timing}),
+      displayValue: str_(i18n.UIStrings.seconds, {timeInMs: metricResult.timing}),
     };
   }
 }
diff --git a/lighthouse-core/audits/metrics/interactive.js b/lighthouse-core/audits/metrics/interactive.js
index d9be0ec6d..455fb94cf 100644
--- a/lighthouse-core/audits/metrics/interactive.js
+++ b/lighthouse-core/audits/metrics/interactive.js
@@ -78,7 +78,7 @@ class InteractiveMetric extends Audit {
         context.options.scoreMedian
       ),
       rawValue: timeInMs,
-      displayValue: str_(i18n.UIStrings.ms, {timeInMs}),
+      displayValue: str_(i18n.UIStrings.seconds, {timeInMs}),
       extendedInfo: {
         value: extendedInfo,
       },
diff --git a/lighthouse-core/audits/metrics/speed-index.js b/lighthouse-core/audits/metrics/speed-index.js
index 246f291c7..28cab1ebe 100644
--- a/lighthouse-core/audits/metrics/speed-index.js
+++ b/lighthouse-core/audits/metrics/speed-index.js
@@ -65,7 +65,7 @@ class SpeedIndex extends Audit {
         context.options.scoreMedian
       ),
       rawValue: metricResult.timing,
-      displayValue: str_(i18n.UIStrings.ms, {timeInMs: metricResult.timing}),
+      displayValue: str_(i18n.UIStrings.seconds, {timeInMs: metricResult.timing}),
     };
   }
 }
diff --git a/lighthouse-core/gather/computed/trace-of-tab.js b/lighthouse-core/gather/computed/trace-of-tab.js
index a3addf08e..ecc1afc91 100644
--- a/lighthouse-core/gather/computed/trace-of-tab.js
+++ b/lighthouse-core/gather/computed/trace-of-tab.js
@@ -22,11 +22,24 @@ const TracingProcessor = require('../../lib/traces/tracing-processor');
 const LHError = require('../../lib/errors');
 const Sentry = require('../../lib/sentry');
 
+const ACCEPTABLE_NAVIGATION_URL_REGEX = /^(chrome|https?):/;
+
 class TraceOfTab extends ComputedArtifact {
   get name() {
     return 'TraceOfTab';
   }
 
+  /**
+   * Returns true if the event is a navigation start event of a document whose URL seems valid.
+   *
+   * @param {LH.TraceEvent} event
+   */
+  static isNavigationStartOfInterest(event) {
+    return event.name === 'navigationStart' &&
+      (!event.args.data || !event.args.data.documentLoaderURL ||
+        ACCEPTABLE_NAVIGATION_URL_REGEX.test(event.args.data.documentLoaderURL));
+  }
+
   /**
    * @param {LH.TraceEvent[]} traceEvents
    * @param {(e: LH.TraceEvent) => boolean} filter
@@ -79,7 +92,7 @@ class TraceOfTab extends ComputedArtifact {
     const frameEvents = keyEvents.filter(e => e.args.frame === frameId);
 
     // Our navStart will be the last frame navigation in the trace
-    const navigationStart = frameEvents.filter(e => e.name === 'navigationStart').pop();
+    const navigationStart = frameEvents.filter(TraceOfTab.isNavigationStartOfInterest).pop();
     if (!navigationStart) throw new LHError(LHError.errors.NO_NAVSTART);
 
     // Find our first paint of this frame
diff --git a/lighthouse-core/lib/i18n.js b/lighthouse-core/lib/i18n.js
index 274137464..f1b2ac8bf 100644
--- a/lighthouse-core/lib/i18n.js
+++ b/lighthouse-core/lib/i18n.js
@@ -36,8 +36,10 @@ const MESSAGE_INSTANCE_ID_REGEX = /(.* \| .*) # (\d+)$/;
 
 
 const UIStrings = {
-/** Used to show the duration in milliseconds that something lasted. The `{timeInMs}` placeholder will be replaced with the time duration, shown in milliseconds (e.g. 63 ms) */
+  /** Used to show the duration in milliseconds that something lasted. The `{timeInMs}` placeholder will be replaced with the time duration, shown in milliseconds (e.g. 63 ms) */
   ms: '{timeInMs, number, milliseconds}\xa0ms',
+  /** Used to show the duration in seconds that something lasted. The {timeInMs} placeholder will be replaced with the time duration, shown in seconds (e.g. 5.2 s) */
+  seconds: '{timeInMs, number, seconds}\xa0s',
   /** Label shown per-audit to show how many bytes smaller the page could be if the user implemented the suggestions. The `{wastedBytes}` placeholder will be replaced with the number of bytes, shown in kilobytes (e.g. 148 KB) */
   displayValueByteSavings: 'Potential savings of {wastedBytes, number, bytes}\xa0KB',
   /** Label shown per-audit to show how many milliseconds faster the page load could be if the user implemented the suggestions. The `{wastedMs}` placeholder will be replaced with the time duration, shown in milliseconds (e.g. 140 ms) */
@@ -64,6 +66,11 @@ const formats = {
     milliseconds: {
       maximumFractionDigits: 0,
     },
+    seconds: {
+      // Force the seconds to the tenths place for limited output and ease of scanning
+      minimumFractionDigits: 1,
+      maximumFractionDigits: 1,
+    },
   },
 };
 
@@ -109,6 +116,12 @@ function _preprocessMessageValues(icuMessage, values) {
     // @ts-ignore - el.id is always defined when el.format is defined
     .forEach(el => (clonedValues[el.id] = Math.round(clonedValues[el.id] / 10) * 10));
 
+  // Convert all seconds to the correct unit
+  parsed.elements
+    .filter(el => el.format && el.format.style === 'seconds' && el.id === 'timeInMs')
+    // @ts-ignore - el.id is always defined when el.format is defined
+    .forEach(el => (clonedValues[el.id] = Math.round(clonedValues[el.id] / 100) / 10));
+
   // Replace all the bytes with KB
   parsed.elements
     .filter(el => el.format && el.format.style === 'bytes')
diff --git a/lighthouse-core/lib/locales/en-US.json b/lighthouse-core/lib/locales/en-US.json
index 15e947076..c28ad3bf1 100644
--- a/lighthouse-core/lib/locales/en-US.json
+++ b/lighthouse-core/lib/locales/en-US.json
@@ -407,6 +407,10 @@
     "message": "{timeInMs, number, milliseconds} ms",
     "description": "Used to show the duration in milliseconds that something lasted. The `{timeInMs}` placeholder will be replaced with the time duration, shown in milliseconds (e.g. 63 ms)"
   },
+  "lighthouse-core/lib/i18n.js | seconds": {
+    "message": "{timeInMs, number, seconds} s",
+    "description": "Used to show the duration in seconds that something lasted. The {timeInMs} placeholder will be replaced with the time duration, shown in seconds (e.g. 5.2 s)"
+  },
   "lighthouse-core/report/html/renderer/util.js | auditGroupExpandTooltip": {
     "message": "Show audits",
     "description": "The tooltip text on an expandable chevron icon. Clicking the icon expands a section to reveal a list of audit results that was hidden by default."
diff --git a/readme.md b/readme.md
index ead4069a2..2c3b1c66e 100644
--- a/readme.md
+++ b/readme.md
@@ -230,9 +230,10 @@ yarn build-all
 
 ```sh
 node lighthouse-cli http://example.com
+# append --chrome-flags="--no-sandbox --headless --disable-gpu" if you run into problems connecting to Chrome
 ```
 
-> **Getting started tip**: `node --inspect --debug-brk lighthouse-cli http://example.com` to open up Chrome DevTools and step
+> **Getting started tip**: `node --inspect-brk lighthouse-cli http://example.com` to open up Chrome DevTools and step
 through the entire app. See [Debugging Node.js with Chrome
 DevTools](https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.59rma3ukm)
 for more info.
diff --git a/typings/externs.d.ts b/typings/externs.d.ts
index f68e5c61c..bae9a77db 100644
--- a/typings/externs.d.ts
+++ b/typings/externs.d.ts
@@ -166,6 +166,7 @@ declare global {
         fileName?: string;
         snapshot?: string;
         data?: {
+          documentLoaderURL?: string;
           frames?: {
             frame: string;
             parent?: string;


Test patch:
diff --git a/lighthouse-core/test/audits/metrics/first-meaningful-paint-test.js b/lighthouse-core/test/audits/metrics/first-meaningful-paint-test.js
index e44b4cdbf..7d6ea997a 100644
--- a/lighthouse-core/test/audits/metrics/first-meaningful-paint-test.js
+++ b/lighthouse-core/test/audits/metrics/first-meaningful-paint-test.js
@@ -27,7 +27,7 @@ describe('Performance: first-meaningful-paint audit', () => {
 
     assert.equal(fmpResult.score, 1);
     assert.equal(fmpResult.rawValue, 783.328);
-    expect(fmpResult.displayValue).toBeDisplayString('780\xa0ms');
+    expect(fmpResult.displayValue).toBeDisplayString('0.8\xa0s');
   });
 
   it('computes FMP correctly for simulated', async () => {
diff --git a/lighthouse-core/test/audits/metrics/interactive-test.js b/lighthouse-core/test/audits/metrics/interactive-test.js
index 544e1defd..158a7588d 100644
--- a/lighthouse-core/test/audits/metrics/interactive-test.js
+++ b/lighthouse-core/test/audits/metrics/interactive-test.js
@@ -34,7 +34,7 @@ describe('Performance: interactive audit', () => {
     return Interactive.audit(artifacts, {options, settings}).then(output => {
       assert.equal(output.score, 1);
       assert.equal(Math.round(output.rawValue), 1582);
-      expect(output.displayValue).toBeDisplayString('1,580\xa0ms');
+      expect(output.displayValue).toBeDisplayString('1.6\xa0s');
     });
   });
 
@@ -52,7 +52,7 @@ describe('Performance: interactive audit', () => {
     return Interactive.audit(artifacts, {options, settings}).then(output => {
       assert.equal(output.score, 0.97);
       assert.equal(Math.round(output.rawValue), 2712);
-      expect(output.displayValue).toBeDisplayString('2,710\xa0ms');
+      expect(output.displayValue).toBeDisplayString('2.7\xa0s');
     });
   });
 });
diff --git a/lighthouse-core/test/fixtures/traces/preactjs.com_ts_of_undefined.json b/lighthouse-core/test/fixtures/traces/preactjs.com_ts_of_undefined.json
index 2241e1387..7146cff62 100644
--- a/lighthouse-core/test/fixtures/traces/preactjs.com_ts_of_undefined.json
+++ b/lighthouse-core/test/fixtures/traces/preactjs.com_ts_of_undefined.json
@@ -71,6 +71,19 @@
         "frame": "0x25edaa521e58"
       },
       "tts": 826016
+    },
+    {
+      "pid": 6117,
+      "tid": 775,
+      "ts": 1805897263653,
+      "ph": "R",
+      "cat": "blink.user_timing",
+      "name": "navigationStart",
+      "args": {
+        "frame": "0x25edaa521e58",
+        "data": {"documentLoaderURL": "intent://this-one-should-be-ignored"}
+      },
+      "tts": 673412
     },
       {
       "pid": 6117,
diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json
index d0109e05f..230c95f8f 100644
--- a/lighthouse-core/test/results/sample_v2.json
+++ b/lighthouse-core/test/results/sample_v2.json
@@ -84,7 +84,7 @@
       "score": 0.51,
       "scoreDisplayMode": "numeric",
       "rawValue": 3969.135,
-      "displayValue": "3,970 ms"
+      "displayValue": "4.0 s"
     },
     "first-meaningful-paint": {
       "id": "first-meaningful-paint",
@@ -93,7 +93,7 @@
       "score": 0.51,
       "scoreDisplayMode": "numeric",
       "rawValue": 3969.136,
-      "displayValue": "3,970 ms"
+      "displayValue": "4.0 s"
     },
     "load-fast-enough-for-pwa": {
       "id": "load-fast-enough-for-pwa",
@@ -110,7 +110,7 @@
       "score": 0.74,
       "scoreDisplayMode": "numeric",
       "rawValue": 4417,
-      "displayValue": "4,420 ms"
+      "displayValue": "4.4 s"
     },
     "screenshot-thumbnails": {
       "id": "screenshot-thumbnails",
@@ -270,7 +270,7 @@
       "score": 0.72,
       "scoreDisplayMode": "numeric",
       "rawValue": 4927.278,
-      "displayValue": "4,930 ms"
+      "displayValue": "4.9 s"
     },
     "interactive": {
       "id": "interactive",
@@ -279,7 +279,7 @@
       "score": 0.78,
       "scoreDisplayMode": "numeric",
       "rawValue": 4927.278,
-      "displayValue": "4,930 ms"
+      "displayValue": "4.9 s"
     },
     "user-timings": {
       "id": "user-timings",
@@ -646,7 +646,7 @@
       "score": 0.96,
       "scoreDisplayMode": "numeric",
       "rawValue": 1548.5690000000002,
-      "displayValue": "1,550 ms",
+      "displayValue": "1.5 s",
       "details": {
         "type": "table",
         "headings": [
@@ -708,7 +708,7 @@
       "score": 0.92,
       "scoreDisplayMode": "numeric",
       "rawValue": 1150.932,
-      "displayValue": "1,150 ms",
+      "displayValue": "1.2 s",
       "details": {
         "type": "table",
         "headings": [
@@ -3429,7 +3429,7 @@
       "lighthouse-core/audits/metrics/first-contentful-paint.js | description": [
         "audits[first-contentful-paint].description"
       ],
-      "lighthouse-core/lib/i18n.js | ms": [
+      "lighthouse-core/lib/i18n.js | seconds": [
         {
           "values": {
             "timeInMs": 3969.135
@@ -3448,12 +3448,6 @@
           },
           "path": "audits[speed-index].displayValue"
         },
-        {
-          "values": {
-            "timeInMs": 16
-          },
-          "path": "audits[estimated-input-latency].displayValue"
-        },
         {
           "values": {
             "timeInMs": 4927.278
@@ -3497,6 +3491,14 @@
       "lighthouse-core/audits/metrics/estimated-input-latency.js | description": [
         "audits[estimated-input-latency].description"
       ],
+      "lighthouse-core/lib/i18n.js | ms": [
+        {
+          "values": {
+            "timeInMs": 16
+          },
+          "path": "audits[estimated-input-latency].displayValue"
+        }
+      ],
       "lighthouse-core/audits/time-to-first-byte.js | title": [
         "audits[time-to-first-byte].title"
       ],