Skip to content

Conversation

@adamraine
Copy link
Contributor

@adamraine adamraine commented Oct 24, 2022

Example result on https://www.espn.com/:

Screen Shot 2022-10-24 at 3 26 37 PM

Screen Shot 2022-11-29 at 4 21 10 PM

Changes we should consider:

  • Using the explanations tree to identify which frame the errors are referring to. We can provide more insight than "The page has an unload handler in a sub frame".
  • Right now, the audit only fails when there are actionable failures (PageSupportNeeded reason type). It's common for bf cache to fail for reasons related to the browser. Perhaps we should still surface these "non actionable" errors but still pass the audit. The DT panel lists them under "Pending support" and "Not Actionable" sections.
  • Create a BFCacheErrors computed artifact and get the event from the DT log for timespan mode.

Ref
#13960

import FRGatherer from '../base-gatherer.js';
import {waitForFrameNavigated, waitForLoadEvent} from '../driver/wait-for-condition.js';

class BFCacheErrors extends FRGatherer {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe name to just BFCache or BFCacheReasonsNotRestored?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to differentiate from the BFCache audit, and BFCacheReasonsNotRestored feels too long. This also mirrors the InstallabilityErrors artifact.

const entry = history.entries[history.currentIndex];

await Promise.all([
session.sendCommand('Page.navigate', {url: 'chrome://terms'}),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • need to verify this url works in edge and brave
  • need to confirm we can't just use about:blank (does the devtools CL suggest why, exactly?)

Copy link
Contributor Author

@adamraine adamraine Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to verify this url works in edge and brave

It works but the contents are different for each browser. (Doesn't work in opera if that matters)

need to confirm we can't just use about:blank (does the devtools CL suggest why, exactly?)

https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/panels/application/components/BackForwardCacheView.ts;l=266-270?q=BackForwardCacheView&ss=chromium%2Fchromium%2Fsrc:third_party%2Fdevtools-frontend%2Fsrc%2F

Seems like about:blank would fit the bill as well?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending response from chrome peeps about if about:blank would suffice here.


// BF cache will request the page again, initiating additional network requests.
// Disable the audit so we only detect requests from the normal page load.
skipAudits: ['bf-cache'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should have a test-definition base config we extend from? we could also specify only-categories: [] in it, forcing smoke configs that extend it to be more specific (I assume that works...)

Copy link
Contributor Author

@adamraine adamraine Nov 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like overkill plus it would be confusing when writing a test to bounce between the smokehouse base config and the test specific config.

This issue is only present on a handful of tests.

}

return {
score: 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may want to mark n/a if supportPendingTable or notActionableTable is >0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are still actionable failures I think it's worth surfacing them

const entry = history.entries[history.currentIndex];

await Promise.all([
session.sendCommand('Page.navigate', {url: 'chrome://terms'}),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending response from chrome peeps about if about:blank would suffice here.

copybara-service bot pushed a commit to ChromeDevTools/devtools-frontend that referenced this pull request Jan 10, 2023
Required for bfcache testing in Lighthouse to work:
GoogleChrome/lighthouse#14465

Bug: None
Change-Id: I4faf54e5dee9acdf8ffde4ee8762c21ed7fb50b5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4117673
Commit-Queue: Adam Raine <[email protected]>
Reviewed-by: Benedikt Meurer <[email protected]>
Reviewed-by: Paul Irish <[email protected]>
@adamraine
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants