Skip to content

Commit

Permalink
core(inspector-issues): add cookie deprecation issue (#15553)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Oct 19, 2023
1 parent 8f7696f commit f1a5e59
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 17 deletions.
1 change: 1 addition & 0 deletions core/gather/gatherers/inspector-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class InspectorIssues extends BaseGatherer {
bounceTrackingIssue: [],
clientHintIssue: [],
contentSecurityPolicyIssue: [],
cookieDeprecationMetadataIssue: [],
corsIssue: [],
deprecationIssue: [],
federatedAuthRequestIssue: [],
Expand Down
1 change: 1 addition & 0 deletions core/test/audits/dobetterweb/inspector-issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('Has inspector issues audit', () => {
blockedByResponseIssue: [],
clientHintIssue: [],
contentSecurityPolicyIssue: [],
cookieDeprecationMetadataIssue: [],
corsIssue: [],
deprecationIssue: [],
federatedAuthRequestIssue: [],
Expand Down
2 changes: 2 additions & 0 deletions core/test/gather/gatherers/inspector-issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ describe('getArtifact', () => {
isReportOnly: false,
contentSecurityPolicyViolationType: 'kInlineViolation',
}],
cookieDeprecationMetadataIssue: [],
deprecationIssue: [{
type: 'AuthorizationCoveredByWildcard',
sourceCodeLocation: {
Expand Down Expand Up @@ -304,6 +305,7 @@ describe('getArtifact', () => {
heavyAdIssue: [],
clientHintIssue: [],
contentSecurityPolicyIssue: [],
cookieDeprecationMetadataIssue: [],
deprecationIssue: [],
attributionReportingIssue: [],
corsIssue: [],
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@
},
"devDependencies": {
"@build-tracker/cli": "^1.0.0-beta.15",
"@formatjs/icu-messageformat-parser": "^2.6.2",
"@esbuild-kit/esm-loader": "^2.1.1",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@formatjs/icu-messageformat-parser": "^2.6.2",
"@jest/fake-timers": "^28.1.0",
"@testing-library/preact": "^3.1.1",
"@testing-library/preact-hooks": "^1.1.0",
Expand Down Expand Up @@ -185,7 +185,7 @@
"chrome-launcher": "^1.1.0",
"configstore": "^5.0.1",
"csp_evaluator": "1.1.1",
"devtools-protocol": "0.0.1200039",
"devtools-protocol": "0.0.1211954",
"enquirer": "^2.3.6",
"http-link-header": "^1.1.1",
"intl-messageformat": "^10.5.3",
Expand All @@ -209,8 +209,8 @@
"yargs-parser": "^21.0.0"
},
"resolutions": {
"puppeteer/**/devtools-protocol": "0.0.1200039",
"puppeteer-core/**/devtools-protocol": "0.0.1200039"
"puppeteer/**/devtools-protocol": "0.0.1211954",
"puppeteer-core/**/devtools-protocol": "0.0.1211954"
},
"repository": "GoogleChrome/lighthouse",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Array [
"bounceTrackingIssueDetails",
"clientHintIssueDetails",
"contentSecurityPolicyIssueDetails",
"cookieDeprecationMetadataIssueDetails",
"cookieIssueDetails",
"corsIssueDetails",
"deprecationIssueDetails",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
waitForAria,
waitForElementWithTextContent,
} from '../../shared/helper.js';
import {describe} from '../../shared/mocha-extensions.js';
import {describe, it} from '../../shared/mocha-extensions.js';
import {openDeviceToolbar, reloadDockableFrontEnd, selectDevice} from '../helpers/emulation-helpers.js';
import {
clickStartButton,
Expand Down Expand Up @@ -57,23 +57,23 @@ describe('DevTools', function() {
// the designated tests in network-request-blocking-panel_test.ts are skipped by default due to flakiness.
beforeEach(async () => {
const {frontend} = getBrowserAndPages();
await frontend.evaluate(() => {
// @ts-ignore layout test global
const networkManager = self.SDK.multitargetNetworkManager;
await frontend.evaluate(`(async () => {
const SDK = await import('./core/sdk/sdk.js');
const networkManager = SDK.NetworkManager.MultitargetNetworkManager.instance();
networkManager.setBlockingEnabled(true);
networkManager.setBlockedPatterns([{enabled: true, url: '*.css'}]);
});
})()`);
});

// Reset request blocking state
afterEach(async () => {
const {frontend} = getBrowserAndPages();
await frontend.evaluate(() => {
// @ts-ignore layout test global
const networkManager = globalThis.SDK.multitargetNetworkManager;
await frontend.evaluate(`(async () => {
const SDK = await import('./core/sdk/sdk.js');
const networkManager = SDK.NetworkManager.MultitargetNetworkManager.instance();
networkManager.setBlockingEnabled(false);
networkManager.setBlockedPatterns([]);
});
})()`);
});

it('is respected during a lighthouse run', async () => {
Expand Down
1 change: 1 addition & 0 deletions types/artifacts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ declare module Artifacts {
bounceTrackingIssue: Crdp.Audits.BounceTrackingIssueDetails[];
clientHintIssue: Crdp.Audits.ClientHintIssueDetails[];
contentSecurityPolicyIssue: Crdp.Audits.ContentSecurityPolicyIssueDetails[];
cookieDeprecationMetadataIssue: Crdp.Audits.CookieDeprecationMetadataIssueDetails[],
corsIssue: Crdp.Audits.CorsIssueDetails[];
deprecationIssue: Crdp.Audits.DeprecationIssueDetails[];
federatedAuthRequestIssue: Crdp.Audits.FederatedAuthRequestIssueDetails[],
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2911,10 +2911,10 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=

devtools-protocol@0.0.1179426, devtools-protocol@0.0.1200039:
version "0.0.1200039"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1200039.tgz#5a546df3edff52e6226abfc26f559e05647c956b"
integrity sha512-ZQCB/hbFmu23fLrR3OX3FEJ56dBHXBO+OrnXBtutZzJmIRWycDb7Yz4aO7BiFF9moUgBS+Xo7+EAWZhZraOUfg==
devtools-protocol@0.0.1179426, devtools-protocol@0.0.1211954:
version "0.0.1211954"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1211954.tgz#86ea77d011baab619fb096fc426fd8633ad2ef9b"
integrity sha512-f6BRhngr9wpHN8omZOoSaEJFscTL+tjNhmeBqHHC3CZ3K2N75sDeKXZeTkAEkTCcrusDatfwjRRBh0uz4ov/sA==

diff-sequences@^28.0.2:
version "28.0.2"
Expand Down

0 comments on commit f1a5e59

Please sign in to comment.