Skip to content

Commit

Permalink
core: fix worker request expectations for M121 (#15601)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Nov 14, 2023
1 parent 9a27525 commit 5ff1960
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 14 additions & 3 deletions cli/test/smokehouse/test-definitions/oopif-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ const expectations = {
{url: 'http://localhost:10503/simple-script.js', resourceType: 'Fetch'},
{url: 'http://localhost:10200/simple-worker.js'},
{url: 'http://localhost:10503/simple-worker.js'},
// Requests from worker targets
{url: 'http://localhost:10200/simple-worker.mjs'},
{url: 'http://localhost:10503/simple-worker.mjs'},
// Requests from worker targets
{url: 'http://localhost:10200/simple-script.js?esm', resourceType: 'Script'},
{url: 'http://localhost:10503/simple-script.js?esm', resourceType: 'Script'},
{url: 'http://localhost:10200/simple-script.js?importScripts', resourceType: 'Other'},
Expand Down Expand Up @@ -100,13 +100,24 @@ const expectations = {
},
],
// 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).
// All other scripts are filtered out because of our "OOPIF" filter.
ScriptElements: [
{
src: 'http://localhost:10200/simple-script.js',
source: 'network',
},
{
// Worker requests emitted on the worker's parent target since M121.
_minChromiumVersion: '121',
src: 'http://localhost:10200/simple-worker.mjs',
source: 'network',
},
{
// Worker requests emitted on the worker's parent target since M121.
_minChromiumVersion: '121',
src: 'http://localhost:10200/simple-worker.js',
source: 'network',
},
],
// Same here, except we get inline scripts of the iframe.
Scripts: {
Expand Down
4 changes: 2 additions & 2 deletions core/test/scenarios/api-test-pptr.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Array [
"url": "http://localhost:10200/simple-worker.js",
},
Object {
"sessionTargetType": "worker",
"sessionTargetType": "page",
"url": "http://localhost:10200/simple-worker.mjs",
},
Object {
Expand All @@ -219,7 +219,7 @@ Array [
"url": "http://localhost:10503/simple-worker.js",
},
Object {
"sessionTargetType": "worker",
"sessionTargetType": "iframe",
"url": "http://localhost:10503/simple-worker.mjs",
},
]
Expand Down

0 comments on commit 5ff1960

Please sign in to comment.