Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: use origin-agent-cluster to actually test oopifs #13777

Merged
merged 5 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lighthouse-cli/test/fixtures/static-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ class Server {
// Used by Smokerider.
if (this._dataTransformer) data = this._dataTransformer(data);

const headers = {'Access-Control-Allow-Origin': '*'};
const headers = {
'Access-Control-Allow-Origin': '*',
'Origin-Agent-Cluster': '?1',
};

const contentType = mime.lookup(filePath);
const charset = mime.lookup(contentType);
Expand Down
15 changes: 2 additions & 13 deletions lighthouse-cli/test/smokehouse/test-definitions/oopif-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,16 @@ const expectations = {
isPositionFixed: true,
},
],
// Only `oopif-simple-page.html`'s inclusion of `simple-script.js` should show up here.
// Only `:10200/oopif-simple-page.html`'s inclusion of `simple-script.js` shows here.
// All other scripts are filtered out because of our "OOPIF" filter (including anything
// that is just in another process, like a worker).
ScriptElements: [
{
src: 'http://localhost:10200/simple-script.js',
source: 'network',
},
{
Copy link
Collaborator Author

@connorjclark connorjclark Mar 23, 2022

Choose a reason for hiding this comment

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

shouldn't have ignored this in the original pr :)

src: 'http://localhost:10503/simple-script.js',
source: 'network',
},
],
// Same here, except we get inline scripts of the iframe.
Scripts: {
_includes: [
{
Expand All @@ -125,14 +122,6 @@ const expectations = {
url: 'http://localhost:10200/oopif-simple-page.html',
content: /new Worker/,
},
{
url: 'http://localhost:10503/simple-script.js',
content: /🪁/,
},
{
url: 'http://localhost:10503/oopif-simple-page.html',
content: /new Worker/,
},
],
_excludes: [{}],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const expectations = {
audits: {
'resource-summary': {
score: null,
displayValue: '10 requests • 164 KiB',
displayValue: '10 requests • 165 KiB',
details: {
items: [
{resourceType: 'total', requestCount: 10, transferSize: '168000±1000'},
Expand All @@ -86,7 +86,7 @@ const expectations = {
{
resourceType: 'total',
countOverBudget: '2 requests',
sizeOverBudget: '65000±1000',
sizeOverBudget: '66000±1000',
},
{
resourceType: 'script',
Expand All @@ -101,7 +101,7 @@ const expectations = {
{
resourceType: 'document',
countOverBudget: '1 request',
sizeOverBudget: '1200±50',
sizeOverBudget: '1250±50',
},
{
resourceType: 'stylesheet',
Expand Down