Skip to content

Commit

Permalink
tests(dbw): update expectations for unload handler removal (#15765)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine authored Jan 16, 2024
1 parent f8a16b7 commit 3d27df1
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions cli/test/smokehouse/test-definitions/dobetterweb.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ const expectations = {
},
],
GlobalListeners: [{
// Unload handlers were disabled in M122
_maxChromiumVersion: '121',
type: 'unload',
scriptId: /^\d+$/,
lineNumber: '>300',
Expand Down Expand Up @@ -306,6 +308,13 @@ const expectations = {
description: 'Failed to load resource: the server responded with a status of 404 (Not Found)',
sourceLocation: {url: 'http://localhost:10200/favicon.ico'},
},
{
// Unload handlers were disabled in M122
_minChromiumVersion: '122',
source: 'violation',
description: 'Permissions policy violation: unload is not allowed in this document.',
sourceLocation: {url: 'http://localhost:10200/dobetterweb/dbw_tester.html'},
},
],
},
},
Expand Down Expand Up @@ -378,7 +387,10 @@ const expectations = {
subItems: undefined,
},
{
// Deprecation warning was added in M121
_minChromiumVersion: '121',
// Unload handlers were disabled in M122
_maxChromiumVersion: '121',
value: 'UnloadHandler',
source: {
type: 'source-location',
Expand Down Expand Up @@ -480,6 +492,8 @@ const expectations = {
},
},
'no-unload-listeners': {
// Unload handlers were disabled in M122
_maxChromiumVersion: '121',
score: 0,
details: {
items: [{
Expand All @@ -497,6 +511,8 @@ const expectations = {
details: {
items: [
{
// Unload handlers were disabled in M122
_maxChromiumVersion: '121',
reason: 'The page has an unload handler in the main frame.',
failureType: 'Actionable',
subItems: {
Expand All @@ -506,9 +522,8 @@ const expectations = {
},
},
{
// This issue only appears in the DevTools runner for some reason.
// TODO: Investigate why this doesn't happen on the CLI runner.
_runner: 'devtools',
// Unload handlers create a permission request in M122
_minChromiumVersion: '122',
reason: 'There were permission requests upon navigating away.',
failureType: 'Pending browser support',
subItems: {
Expand Down

0 comments on commit 3d27df1

Please sign in to comment.