From b6bd7c0d6a61aa6ae31f84e6ff3fc1dfccb83e77 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 16 Feb 2021 14:21:47 -0800 Subject: [PATCH] feat(chromium): roll Chromium to r851527 (#5434) Fixes #5197 --- README.md | 4 +- browsers.json | 2 +- src/server/chromium/protocol.ts | 64 ++++++++++++++++-- .../chromium/screenshot-mobile-clip.png | Bin 1660 -> 1542 bytes types/protocol.d.ts | 64 ++++++++++++++++-- 5 files changed, 117 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 28d73261ec..b932262551 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 🎭 Playwright -[![npm version](https://img.shields.io/npm/v/playwright.svg?style=flat)](https://www.npmjs.com/package/playwright) [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://join.slack.com/t/playwright/shared_invite/enQtOTEyMTUxMzgxMjIwLThjMDUxZmIyNTRiMTJjNjIyMzdmZDA3MTQxZWUwZTFjZjQwNGYxZGM5MzRmNzZlMWI5ZWUyOTkzMjE5Njg1NDg) [![Chromium version](https://img.shields.io/badge/chromium-90.0.4399.0-blue.svg?logo=google-chrome)](https://www.chromium.org/Home) [![Firefox version](https://img.shields.io/badge/firefox-86.0b9-blue.svg?logo=mozilla-firefox)](https://www.mozilla.org/en-US/firefox/new/) [![WebKit version](https://img.shields.io/badge/webkit-14.1-blue.svg?logo=safari)](https://webkit.org/) +[![npm version](https://img.shields.io/npm/v/playwright.svg?style=flat)](https://www.npmjs.com/package/playwright) [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://join.slack.com/t/playwright/shared_invite/enQtOTEyMTUxMzgxMjIwLThjMDUxZmIyNTRiMTJjNjIyMzdmZDA3MTQxZWUwZTFjZjQwNGYxZGM5MzRmNzZlMWI5ZWUyOTkzMjE5Njg1NDg) [![Chromium version](https://img.shields.io/badge/chromium-90.0.4412.0-blue.svg?logo=google-chrome)](https://www.chromium.org/Home) [![Firefox version](https://img.shields.io/badge/firefox-86.0b9-blue.svg?logo=mozilla-firefox)](https://www.mozilla.org/en-US/firefox/new/) [![WebKit version](https://img.shields.io/badge/webkit-14.1-blue.svg?logo=safari)](https://webkit.org/) ## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/#?path=docs/api.md) @@ -8,7 +8,7 @@ Playwright is a Node.js library to automate [Chromium](https://www.chromium.org/ | | Linux | macOS | Windows | | :--- | :---: | :---: | :---: | -| Chromium 90.0.4399.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Chromium 90.0.4412.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | WebKit 14.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | Firefox 86.0b9 | :white_check_mark: | :white_check_mark: | :white_check_mark: | diff --git a/browsers.json b/browsers.json index 804e64f60b..beeb983750 100644 --- a/browsers.json +++ b/browsers.json @@ -3,7 +3,7 @@ "browsers": [ { "name": "chromium", - "revision": "846621", + "revision": "851527", "download": true }, { diff --git a/src/server/chromium/protocol.ts b/src/server/chromium/protocol.ts index 1042a0f3f8..fed66bb799 100644 --- a/src/server/chromium/protocol.ts +++ b/src/server/chromium/protocol.ts @@ -788,6 +788,7 @@ some CSP errors in the future. } export type ContentSecurityPolicyViolationType = "kInlineViolation"|"kEvalViolation"|"kURLViolation"|"kTrustedTypesSinkViolation"|"kTrustedTypesPolicyViolation"; export interface SourceCodeLocation { + scriptId?: Runtime.ScriptId; url: string; lineNumber: number; columnNumber: number; @@ -807,14 +808,16 @@ some CSP errors in the future. sourceCodeLocation?: SourceCodeLocation; violatingNodeId?: DOM.BackendNodeId; } + export type SharedArrayBufferIssueType = "TransferIssue"|"CreationIssue"; /** * Details for a request that has been blocked with the BLOCKED_BY_RESPONSE code. Currently only used for COEP/COOP, but may be extended to include some CSP errors in the future. */ - export interface SharedArrayBufferTransferIssueDetails { + export interface SharedArrayBufferIssueDetails { sourceCodeLocation: SourceCodeLocation; isWarning: boolean; + type: SharedArrayBufferIssueType; } export type TwaQualityEnforcementViolationType = "kHttpError"|"kUnavailableOffline"|"kDigitalAssetLinks"; export interface TrustedWebActivityIssueDetails { @@ -835,12 +838,21 @@ used when violation type is kDigitalAssetLinks. */ signature?: string; } + export interface LowTextContrastIssueDetails { + violatingNodeId: DOM.BackendNodeId; + violatingNodeSelector: string; + contrastRatio: number; + thresholdAA: number; + thresholdAAA: number; + fontSize: string; + fontWeight: string; + } /** * A unique identifier for the type of issue. Each type may use one of the optional fields in InspectorIssueDetails to convey more specific information about the kind of issue. */ - export type InspectorIssueCode = "SameSiteCookieIssue"|"MixedContentIssue"|"BlockedByResponseIssue"|"HeavyAdIssue"|"ContentSecurityPolicyIssue"|"SharedArrayBufferTransferIssue"|"TrustedWebActivityIssue"; + export type InspectorIssueCode = "SameSiteCookieIssue"|"MixedContentIssue"|"BlockedByResponseIssue"|"HeavyAdIssue"|"ContentSecurityPolicyIssue"|"SharedArrayBufferIssue"|"TrustedWebActivityIssue"|"LowTextContrastIssue"; /** * This struct holds a list of optional fields with additional information specific to the kind of issue. When adding a new issue code, please also @@ -852,8 +864,9 @@ add a new optional field to this type. blockedByResponseIssueDetails?: BlockedByResponseIssueDetails; heavyAdIssueDetails?: HeavyAdIssueDetails; contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails; - sharedArrayBufferTransferIssueDetails?: SharedArrayBufferTransferIssueDetails; + sharedArrayBufferIssueDetails?: SharedArrayBufferIssueDetails; twaQualityEnforcementDetails?: TrustedWebActivityIssueDetails; + lowTextContrastIssueDetails?: LowTextContrastIssueDetails; } /** * An inspector issue reported from the back-end. @@ -918,6 +931,14 @@ applies to images. } export type enableReturnValue = { } + /** + * Runs the contrast check for the target page. Found issues are reported +using Audits.issueAdded event. + */ + export type checkContrastParameters = { + } + export type checkContrastReturnValue = { + } } /** @@ -4742,10 +4763,11 @@ resource fetches. } /** * Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints +Missing optional values will be filled in by the target with what it would normally use. */ export interface UserAgentMetadata { - brands: UserAgentBrandVersion[]; - fullVersion: string; + brands?: UserAgentBrandVersion[]; + fullVersion?: string; platform: string; platformVersion: string; architecture: string; @@ -7205,11 +7227,11 @@ module) (0-based). /** * Types of reasons why a cookie may not be stored from a response. */ - export type SetCookieBlockedReason = "SecureOnly"|"SameSiteStrict"|"SameSiteLax"|"SameSiteUnspecifiedTreatedAsLax"|"SameSiteNoneInsecure"|"UserPreferences"|"SyntaxError"|"SchemeNotSupported"|"OverwriteSecure"|"InvalidDomain"|"InvalidPrefix"|"UnknownError"|"SchemefulSameSiteStrict"|"SchemefulSameSiteLax"|"SchemefulSameSiteUnspecifiedTreatedAsLax"; + export type SetCookieBlockedReason = "SecureOnly"|"SameSiteStrict"|"SameSiteLax"|"SameSiteUnspecifiedTreatedAsLax"|"SameSiteNoneInsecure"|"UserPreferences"|"SyntaxError"|"SchemeNotSupported"|"OverwriteSecure"|"InvalidDomain"|"InvalidPrefix"|"UnknownError"|"SchemefulSameSiteStrict"|"SchemefulSameSiteLax"|"SchemefulSameSiteUnspecifiedTreatedAsLax"|"SamePartyFromCrossPartyContext"|"SamePartyConflictsWithOtherAttributes"; /** * Types of reasons why a cookie may not be sent with a request. */ - export type CookieBlockedReason = "SecureOnly"|"NotOnPath"|"DomainMismatch"|"SameSiteStrict"|"SameSiteLax"|"SameSiteUnspecifiedTreatedAsLax"|"SameSiteNoneInsecure"|"UserPreferences"|"UnknownError"|"SchemefulSameSiteStrict"|"SchemefulSameSiteLax"|"SchemefulSameSiteUnspecifiedTreatedAsLax"; + export type CookieBlockedReason = "SecureOnly"|"NotOnPath"|"DomainMismatch"|"SameSiteStrict"|"SameSiteLax"|"SameSiteUnspecifiedTreatedAsLax"|"SameSiteNoneInsecure"|"UserPreferences"|"UnknownError"|"SchemefulSameSiteStrict"|"SchemefulSameSiteLax"|"SchemefulSameSiteUnspecifiedTreatedAsLax"|"SamePartyFromCrossPartyContext"; /** * A cookie which was not stored from a response with the corresponding reason. */ @@ -8007,6 +8029,11 @@ are represented by the invalid cookie line string instead of a proper cookie. * Raw response headers as they were received over the wire. */ headers: Headers; + /** + * The IP address space of the resource. The address space can only be determined once the transport +established the connection, so we can't send it in `requestWillBeSentExtraInfo`. + */ + resourceIPAddressSpace: IPAddressSpace; /** * Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC. @@ -8702,6 +8729,23 @@ continueInterceptedRequest call. */ crossAlignment?: LineStyle; } + /** + * Configuration data for the highlighting of Flex item elements. + */ + export interface FlexItemHighlightConfig { + /** + * Style of the box representing the item's base size + */ + baseSizeBox?: BoxStyle; + /** + * Style of the border around the box representing the item's base size + */ + baseSizeBorder?: LineStyle; + /** + * Style of the arrow representing if the item grew or shrank + */ + flexibilityArrow?: LineStyle; + } /** * Style information for drawing a line. */ @@ -8797,6 +8841,10 @@ continueInterceptedRequest call. * The flex container highlight configuration (default: all transparent). */ flexContainerHighlightConfig?: FlexContainerHighlightConfig; + /** + * The flex item highlight configuration (default: all transparent). + */ + flexItemHighlightConfig?: FlexItemHighlightConfig; /** * The contrast algorithm to use for the contrast ratio (default: aa). */ @@ -16022,6 +16070,7 @@ unsubscribes current runtime agent from Runtime.bindingCalled notifications. "Audits.getEncodedResponse": Audits.getEncodedResponseParameters; "Audits.disable": Audits.disableParameters; "Audits.enable": Audits.enableParameters; + "Audits.checkContrast": Audits.checkContrastParameters; "BackgroundService.startObserving": BackgroundService.startObservingParameters; "BackgroundService.stopObserving": BackgroundService.stopObservingParameters; "BackgroundService.setRecording": BackgroundService.setRecordingParameters; @@ -16529,6 +16578,7 @@ unsubscribes current runtime agent from Runtime.bindingCalled notifications. "Audits.getEncodedResponse": Audits.getEncodedResponseReturnValue; "Audits.disable": Audits.disableReturnValue; "Audits.enable": Audits.enableReturnValue; + "Audits.checkContrast": Audits.checkContrastReturnValue; "BackgroundService.startObserving": BackgroundService.startObservingReturnValue; "BackgroundService.stopObserving": BackgroundService.stopObservingReturnValue; "BackgroundService.setRecording": BackgroundService.setRecordingReturnValue; diff --git a/test/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-clip/chromium/screenshot-mobile-clip.png b/test/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-clip/chromium/screenshot-mobile-clip.png index e0b7ed42f19f742aea4f65d44dbdac706228434a..e83fc40c6cf9f1a22a890125e3d52513e9b50657 100644 GIT binary patch delta 1259 zcmVF>ljc6oy|XH)_)sT1wQCEVLky(v=AqU`0ZL z-vA>!zk!W~AA%4AsOn5NIv|81XbMQAU{j|h2{9x#L)3mTo6kl1-r;>V59j#wJh3C? z^xhj>xNspuL9Sf6f;f(ghMf>a5w2gqj^Dq3n{&+0&Z5z1m?Gl=;M}=$n46n3$8T?M z(?)Hj#{mTqoX5pJOHe(uVXYCnd1)+4`J!wG&3_ZxnAm(MTUfsAt7W)2pJMWlY9Xb ze-c85gplE0zkXdfD2gHs1_Sd=lO#bHhFRXuAv#nd5=UHdEieeKW_0VdynE1%QQxh1{S` zuPl?j0wiS&2_eJvdcDFytyarxp~`SLM7!Na5CrBNOG`_5`0$}Q9sr&_d*-#yrCct< z(!XiC-EOWA&N85BHkleb z(!XiS<#KMFjI*plDwoS%MF7D3{Ji&h>b|GjJb3Wne?L$CZ}iF{Lqe0f0wrVIty{MW z2kq_cc`dea&LNItuN;Smhu(9UD2lum9`$-XSo$|jr_;%;4{+9=YABujzk2`nnc-8Ro|8Wr}XHRMU!y>ACo=;2z)rp zfTq=IVR?DkeAD4@h*qoRwRu>jQo-H3cg^tt@b29^uena8Qt=va0m$tp2LNt=f4^{& zX0z#ac2gY3s8lLm%fT9r1}o#eLf*fBZ;tQvdR`w)0I1jNxnAm(MTUfs@dtNm V0$}zO>0wI6o%iVCt}jt8Y`A!jnxoQ1PemJk%CTi zrbGXOBmam$LlAVJAao=Ys^Fjm2M+w8Q7W~zwn>_=lXLbtcMy`>472vV@DAQ*wg+pS z-Sw0c$j)9XbNTY+6cbXZRN$POG;BnYB)DNfFKA^DwWLf z?RFc_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