Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into sendCommandAndIgnore
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Apr 9, 2024
2 parents aaef756 + c35b375 commit 6cc86bd
Show file tree
Hide file tree
Showing 88 changed files with 484 additions and 2,480 deletions.
32 changes: 16 additions & 16 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# folders
.vscode/
.github/
assets/
build/
coverage/
proto/
docs/
/assets/
/build/
/coverage/
/proto/
/docs/

core/scripts/*
viewer/
treemap/
clients/
cli/results/
lighthouse-logger/
/core/scripts/*
/viewer/
/treemap/
/clients/
/cli/results/
/lighthouse-logger/
**/test/**
report/test-assets/
/report/test-assets/

# keep a few scripts useful for CI
!core/scripts/manual-chrome-launcher.js
Expand All @@ -25,12 +25,12 @@ report/test-assets/

# Exclude the CLI smoketests but keep the smoketest runner that is used
# by downstream projects (e.g. publisher ads).
!cli/test/smokehouse/**
cli/test/smokehouse/test-definitions/
!/cli/test/smokehouse/**
/cli/test/smokehouse/test-definitions/

results/
lantern-data/
timings-data/
/lantern-data/
/timings-data/

# ignore all folders named as such
node_modules
Expand Down
2 changes: 1 addition & 1 deletion cli/test/fixtures/dobetterweb/dbw_tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@

<!-- Various sites like to assign HTMLElements a custom `matches` property. See issue #5934 -->

<!-- EmbeddedContent will process these elements -->
<!-- Was for deprecated plugins audit, keeping them so smoke expectations don't change (e.g. dom-size) -->
<object id="5934a"></object>
<object id="5934b"></object>

Expand Down
2 changes: 1 addition & 1 deletion cli/test/fixtures/perf/delayed-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function stall(ms) {
}

// largest-contentful-paint-element: add the largest element later in page load
// layout-shift-elements: shift down the `<h1>` in the page
// layout-shifts: shift down the `<h1>` in the page
setTimeout(() => {
const imgEl = document.createElement('img');
imgEl.src = '../dobetterweb/lighthouse-480x318.jpg';
Expand Down
20 changes: 0 additions & 20 deletions cli/test/fixtures/seo/seo-failure-cases.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,5 @@ <h2>Anchor text</h2>
<script>
document.querySelector('.link-parent').addEventListener('click', () => {});
</script>

<!-- FAIL(plugins): java applet on page -->
<applet code=HelloWorld.class width="200" height="200" id='applet'>
Your browser does not support the <code>applet</code> tag.
</applet>

<!-- FAIL(plugins): flash content on page -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="590" height="90" id="adobe-embed" align="middle">
<param name="movie" value="movie_name.swf"/>
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="movie_name.swf" width="590" height="90">
<param name="movie" value="movie_name.swf"/>
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/>
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</body>
</html>
2 changes: 0 additions & 2 deletions cli/test/fixtures/seo/seo-tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ <h6>2</h6>
</script>
<!-- override global URL - bug #5701 -->
<script>URL = '';</script>
<!-- PASS(plugins): external content does not require java, flash or silverlight -->
<object data="test.pdf" type="application/pdf" width="300" height="200"></object>

<!-- PASS(crawlable-anchors): Link with a relative path -->
<a href="/pass">Some link</a>
Expand Down
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ const expectations = {
},
},
'target-size': {
score: 1,
score: 0,
details: {
items: [
{
Expand Down
50 changes: 5 additions & 45 deletions cli/test/smokehouse/test-definitions/perf-trace-elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,37 +80,6 @@ const expectations = {
},
type: 'image',
},
{
traceEventType: 'layout-shift-element',
node: {
selector: 'body > h1',
nodeLabel: 'Please don\'t move me',
snippet: '<h1>',
boundingRect: {
top: 465,
bottom: 502,
left: 8,
right: 404,
width: 396,
height: 37,
},
},
},
{
traceEventType: 'layout-shift-element',
node: {
nodeLabel: 'Sorry!',
snippet: '<div style="height: 18px;">',
boundingRect: {
top: 426,
bottom: 444,
left: 8,
right: 404,
width: 396,
height: 18,
},
},
},
{
traceEventType: 'layout-shift',
node: {
Expand Down Expand Up @@ -188,9 +157,9 @@ const expectations = {
],
},
},
'layout-shift-elements': {
'layout-shifts': {
score: 1,
displayValue: '2 elements found',
displayValue: '2 layout shifts found',
details: {
items: [
{
Expand All @@ -207,22 +176,13 @@ const expectations = {
height: 37,
},
},
score: '0.035 +/- 0.01',
score: '0.05 +/- 0.01',
},
{
node: {
nodeLabel: 'Sorry!',
snippet: '<div style="height: 18px;">',
boundingRect: {
top: 426,
bottom: 444,
left: 8,
right: 404,
width: 396,
height: 18,
},
nodeLabel: /Sorry|Please don't move me/,
},
score: '0.017 +/- 0.01',
score: '0.001 +/- 0.005',
},
],
},
Expand Down
8 changes: 0 additions & 8 deletions cli/test/smokehouse/test-definitions/seo-failing.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ const expectations = {
},
},
},
'plugins': {
score: 0,
details: {
items: {
length: 3,
},
},
},
'canonical': {
score: 0,
explanation: 'Multiple conflicting URLs (https://example.com/other, https://example.com/)',
Expand Down
3 changes: 0 additions & 3 deletions cli/test/smokehouse/test-definitions/seo-passing.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ const expectations = {
'hreflang': {
score: 1,
},
'plugins': {
score: 1,
},
'canonical': {
score: 1,
},
Expand Down
3 changes: 0 additions & 3 deletions cli/test/smokehouse/test-definitions/seo-status-403.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ const expectations = {
'hreflang': {
score: null,
},
'plugins': {
score: null,
},
'canonical': {
score: null,
},
Expand Down
12 changes: 7 additions & 5 deletions cli/test/smokehouse/test-definitions/shift-attribution.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ const expectations = {
node: {selector: 'body > div#blue'},
subItems: {items: [{cause: /font/, extra: {value: /Regular\.ttf/}}]},
},
{
node: {selector: 'body > div#blue'},
// TODO: We can't get nodes from non-main frames yet. See runRootCauseAnalysis.
subItems: {items: [{cause: /iframe/, extra: undefined}]},
},
// iframe root causes are disabled due to performance issues
// https://github.com/GoogleChrome/lighthouse/issues/15869
// {
// node: {selector: 'body > div#blue'},
// // TODO: We can't get nodes from non-main frames yet. See runRootCauseAnalysis.
// subItems: {items: [{cause: /iframe/, extra: undefined}]},
// },
{
node: {selector: 'body > div#blue'},
subItems: {items: [{cause: /Media/, extra: {selector: 'body > img'}}]},
Expand Down
1 change: 0 additions & 1 deletion core/audits/accessibility/target-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class TargetSize extends AxeAudit {
title: str_(UIStrings.title),
failureTitle: str_(UIStrings.failureTitle),
description: str_(UIStrings.description),
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
requiredArtifacts: ['Accessibility'],
};
}
Expand Down
101 changes: 0 additions & 101 deletions core/audits/layout-shift-elements.js

This file was deleted.

2 changes: 1 addition & 1 deletion core/audits/layout-shifts.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class LayoutShifts extends Audit {
.slice(0, MAX_LAYOUT_SHIFTS);
for (const event of topLayoutShiftEvents) {
const biggestImpactNodeId = TraceElements.getBiggestImpactNodeForShiftEvent(
event.args.data.impacted_nodes || [], impactByNodeId);
event.args.data.impacted_nodes || [], impactByNodeId, event);
const biggestImpactElement = traceElements.find(t => t.nodeId === biggestImpactNodeId);

// Turn root causes into sub-items.
Expand Down
Loading

0 comments on commit 6cc86bd

Please sign in to comment.