Skip to content

Commit

Permalink
tests(tags-blocking-first-paint): alternate stylesheets are not… (#9248)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark authored Jul 11, 2019
1 parent 0c78f37 commit a36d263
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 3 deletions.
3 changes: 3 additions & 0 deletions lighthouse-cli/test/fixtures/dobetterweb/dbw_tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<!-- PASS: async stylesheet -->
<link rel="stylesheet" href="./dbw_tester.css?delay=3000&async=true" disabled onload="this.disabled = false">

<!-- Alternate stylesheets should not show in TagsBlockingFirstPaint artifact -->
<link rel="alternate stylesheet" href="./empty.css">

<!-- FAIL: block rendering -->
<script src="./dbw_tester.js"></script>

Expand Down
Empty file.
83 changes: 80 additions & 3 deletions lighthouse-cli/test/smokehouse/dobetterweb/dbw-expectations.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,63 @@ module.exports = [
}, {
id: 'wordpress',
}],
TagsBlockingFirstPaint: [
{
tag: {
tagName: 'LINK',
url: 'http://localhost:10200/dobetterweb/dobetterweb/dbw_tester.css?delay=100',
},
},
{
tag: {
tagName: 'LINK',
url: 'http://localhost:10200/dobetterweb/unknown404.css?delay=200',
},
},
{
tag: {
tagName: 'LINK',
url: 'http://localhost:10200/dobetterweb/dbw_tester.css?delay=2200',
},

},
{
tag: {
tagName: 'LINK',
url: 'http://localhost:10200/dobetterweb/dbw_partial_a.html?delay=200',
},
},
{
tag: {
tagName: 'LINK',
url: 'http://localhost:10200/dobetterweb/dbw_tester.css?delay=3000&capped',
mediaChanges: [
{
href: 'http://localhost:10200/dobetterweb/dbw_tester.css?delay=3000&capped',
media: 'not-matching',
matches: false,
},
{
href: 'http://localhost:10200/dobetterweb/dbw_tester.css?delay=3000&capped',
media: 'screen',
matches: true,
},
],
},
},
{
tag: {
tagName: 'SCRIPT',
url: 'http://localhost:10200/dobetterweb/dbw_tester.js',
},
},
{
tag: {
tagName: 'SCRIPT',
url: 'http://localhost:10200/dobetterweb/fcp-delayer.js?delay=5000',
},
},
],
},
lhr: {
requestedUrl: 'http://localhost:10200/dobetterweb/dbw_tester.html',
Expand Down Expand Up @@ -84,9 +141,29 @@ module.exports = [
score: '<1',
numericValue: '>100',
details: {
items: {
length: 7,
},
items: [
{
url: 'http://localhost:10200/dobetterweb/dobetterweb/dbw_tester.css?delay=100',
},
{
url: 'http://localhost:10200/dobetterweb/unknown404.css?delay=200',
},
{
url: 'http://localhost:10200/dobetterweb/dbw_tester.css?delay=2200',
},
{
url: 'http://localhost:10200/dobetterweb/dbw_partial_a.html?delay=200',
},
{
url: 'http://localhost:10200/dobetterweb/dbw_tester.css?delay=3000&capped',
},
{
url: 'http://localhost:10200/dobetterweb/dbw_tester.js',
},
{
url: 'http://localhost:10200/dobetterweb/fcp-delayer.js?delay=5000',
},
],
},
},
'uses-passive-event-listeners': {
Expand Down

0 comments on commit a36d263

Please sign in to comment.