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: update network target type expectations #16273

Merged
merged 2 commits into from
Dec 3, 2024
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
10 changes: 6 additions & 4 deletions cli/test/smokehouse/test-definitions/oopif-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ const expectations = {
// From in-process iframe
{url: 'http://localhost:10200/simple-script.js', resourceType: 'Script', sessionTargetType: 'page'},
{url: 'http://localhost:10200/simple-script.js', resourceType: 'Fetch', sessionTargetType: 'page'},
{url: 'http://localhost:10200/simple-worker.js', sessionTargetType: 'page'},
// This target type can vary depending on if Chrome's field trial config is being used
// The target type of worker requests can vary depending on the Chrome version and if
// the field trial config is being used.
{url: 'http://localhost:10200/simple-worker.js', sessionTargetType: /(page|worker)/},
{url: 'http://localhost:10200/simple-worker.mjs', sessionTargetType: /(page|worker)/},
// From in-process iframe -> simple-worker.js
{url: 'http://localhost:10200/simple-script.js?importScripts', resourceType: 'Other', sessionTargetType: 'worker'},
Expand All @@ -61,8 +62,9 @@ const expectations = {
// From OOPIF
{url: 'http://localhost:10503/simple-script.js', resourceType: 'Script', sessionTargetType: 'iframe'},
{url: 'http://localhost:10503/simple-script.js', resourceType: 'Fetch', sessionTargetType: 'iframe'},
{url: 'http://localhost:10503/simple-worker.js', sessionTargetType: 'iframe'},
// This target type can vary depending on if Chrome's field trial config is being used
// The target type of worker requests can vary depending on the Chrome version and if
// the field trial config is being used.
{url: 'http://localhost:10503/simple-worker.js', sessionTargetType: /(iframe|worker)/},
{url: 'http://localhost:10503/simple-worker.mjs', sessionTargetType: /(iframe|worker)/},
// From OOPIF -> simple-worker.js
{url: 'http://localhost:10503/simple-script.js?importScripts', resourceType: 'Other', sessionTargetType: 'worker'},
Expand Down
15 changes: 8 additions & 7 deletions core/test/scenarios/api-test-pptr.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ describe('Individual modes API', function() {
.sort((a, b) => a.url.localeCompare(b.url));

// These results can change depending on which Chrome version is used.
// The expectation here is tuned for ToT Chromium WITHOUT the `--disable-field-trial-config`
// The expectation here is tuned for Chromium 133.0.6876.0
//
// Adding the `--disable-field-trial-config` flag or using Chrome canary can change which
// target the root worker requests are associated with.
// Using an older Chromium version can change which target the root
// worker requests are associated with.
// (also depends on --disable-field-trial-config for older versions)
expect(networkRequests).toMatchInlineSnapshot(`
Array [
Object {
Expand All @@ -210,11 +211,11 @@ Array [
"url": "http://localhost:10200/simple-script.js?importScripts",
},
Object {
"sessionTargetType": "page",
"sessionTargetType": "worker",
"url": "http://localhost:10200/simple-worker.js",
},
Object {
"sessionTargetType": "page",
"sessionTargetType": "worker",
"url": "http://localhost:10200/simple-worker.mjs",
},
Object {
Expand All @@ -230,11 +231,11 @@ Array [
"url": "http://localhost:10503/simple-script.js?importScripts",
},
Object {
"sessionTargetType": "iframe",
"sessionTargetType": "worker",
"url": "http://localhost:10503/simple-worker.js",
},
Object {
"sessionTargetType": "iframe",
"sessionTargetType": "worker",
"url": "http://localhost:10503/simple-worker.mjs",
},
]
Expand Down
Loading