Skip to content

Commit 3d27df1

Browse files
authored
tests(dbw): update expectations for unload handler removal (#15765)
1 parent f8a16b7 commit 3d27df1

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

cli/test/smokehouse/test-definitions/dobetterweb.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ const expectations = {
208208
},
209209
],
210210
GlobalListeners: [{
211+
// Unload handlers were disabled in M122
212+
_maxChromiumVersion: '121',
211213
type: 'unload',
212214
scriptId: /^\d+$/,
213215
lineNumber: '>300',
@@ -306,6 +308,13 @@ const expectations = {
306308
description: 'Failed to load resource: the server responded with a status of 404 (Not Found)',
307309
sourceLocation: {url: 'http://localhost:10200/favicon.ico'},
308310
},
311+
{
312+
// Unload handlers were disabled in M122
313+
_minChromiumVersion: '122',
314+
source: 'violation',
315+
description: 'Permissions policy violation: unload is not allowed in this document.',
316+
sourceLocation: {url: 'http://localhost:10200/dobetterweb/dbw_tester.html'},
317+
},
309318
],
310319
},
311320
},
@@ -378,7 +387,10 @@ const expectations = {
378387
subItems: undefined,
379388
},
380389
{
390+
// Deprecation warning was added in M121
381391
_minChromiumVersion: '121',
392+
// Unload handlers were disabled in M122
393+
_maxChromiumVersion: '121',
382394
value: 'UnloadHandler',
383395
source: {
384396
type: 'source-location',
@@ -480,6 +492,8 @@ const expectations = {
480492
},
481493
},
482494
'no-unload-listeners': {
495+
// Unload handlers were disabled in M122
496+
_maxChromiumVersion: '121',
483497
score: 0,
484498
details: {
485499
items: [{
@@ -497,6 +511,8 @@ const expectations = {
497511
details: {
498512
items: [
499513
{
514+
// Unload handlers were disabled in M122
515+
_maxChromiumVersion: '121',
500516
reason: 'The page has an unload handler in the main frame.',
501517
failureType: 'Actionable',
502518
subItems: {
@@ -506,9 +522,8 @@ const expectations = {
506522
},
507523
},
508524
{
509-
// This issue only appears in the DevTools runner for some reason.
510-
// TODO: Investigate why this doesn't happen on the CLI runner.
511-
_runner: 'devtools',
525+
// Unload handlers create a permission request in M122
526+
_minChromiumVersion: '122',
512527
reason: 'There were permission requests upon navigating away.',
513528
failureType: 'Pending browser support',
514529
subItems: {

0 commit comments

Comments
 (0)