diff --git a/cli/test/smokehouse/test-definitions/oopif-scripts.js b/cli/test/smokehouse/test-definitions/oopif-scripts.js index 323ea2bb246d..eefb8ff7d431 100644 --- a/cli/test/smokehouse/test-definitions/oopif-scripts.js +++ b/cli/test/smokehouse/test-definitions/oopif-scripts.js @@ -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'}, @@ -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'}, diff --git a/core/test/scenarios/api-test-pptr.js b/core/test/scenarios/api-test-pptr.js index 08ff01633985..e9e48d78a163 100644 --- a/core/test/scenarios/api-test-pptr.js +++ b/core/test/scenarios/api-test-pptr.js @@ -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 { @@ -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 { @@ -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", }, ]