From ca36fa5a462105151b0cd600d1a557e6d7247cf3 Mon Sep 17 00:00:00 2001 From: Yad Smood Date: Tue, 8 Feb 2022 15:34:32 +0800 Subject: [PATCH] update chrome revision --- lib/launcher/revision.go | 2 +- lib/proto/audits.go | 31 ++++++++ lib/proto/debugger.go | 4 +- lib/proto/definitions.go | 11 +++ lib/proto/definitions_test.go | 23 ++++++ lib/proto/dom.go | 12 ++++ lib/proto/overlay.go | 2 +- lib/proto/page.go | 32 +++++++++ lib/proto/runtime.go | 31 ++++++++ lib/proto/storage.go | 132 ++++++++++++++++++++++++++++++++++ lib/proto/web_authn.go | 5 ++ 11 files changed, 282 insertions(+), 3 deletions(-) diff --git a/lib/launcher/revision.go b/lib/launcher/revision.go index 7a91936d..6788be99 100644 --- a/lib/launcher/revision.go +++ b/lib/launcher/revision.go @@ -3,4 +3,4 @@ package launcher // DefaultRevision for chrome -const DefaultRevision = 950341 +const DefaultRevision = 961656 diff --git a/lib/proto/audits.go b/lib/proto/audits.go index a30fd1ce..b90d366c 100644 --- a/lib/proto/audits.go +++ b/lib/proto/audits.go @@ -657,6 +657,31 @@ type AuditsDeprecationIssueDetails struct { // instead. This standard was abandoned in January, 1970. See // https://www.chromestatus.com/feature/5684870116278272 for more details." Message string `json:"message,omitempty"` + + // DeprecationType ... + DeprecationType string `json:"deprecationType"` +} + +// AuditsClientHintIssueReason ... +type AuditsClientHintIssueReason string + +const ( + // AuditsClientHintIssueReasonMetaTagAllowListInvalidOrigin enum const + AuditsClientHintIssueReasonMetaTagAllowListInvalidOrigin AuditsClientHintIssueReason = "MetaTagAllowListInvalidOrigin" + + // AuditsClientHintIssueReasonMetaTagModifiedHTML enum const + AuditsClientHintIssueReasonMetaTagModifiedHTML AuditsClientHintIssueReason = "MetaTagModifiedHTML" +) + +// AuditsClientHintIssueDetails This issue tracks client hints related issues. It's used to deprecate old +// features, encourage the use of new ones, and provide general guidance. +type AuditsClientHintIssueDetails struct { + + // SourceCodeLocation ... + SourceCodeLocation *AuditsSourceCodeLocation `json:"sourceCodeLocation"` + + // ClientHintIssueReason ... + ClientHintIssueReason AuditsClientHintIssueReason `json:"clientHintIssueReason"` } // AuditsInspectorIssueCode A unique identifier for the type of issue. Each type may use one of the @@ -709,6 +734,9 @@ const ( // AuditsInspectorIssueCodeDeprecationIssue enum const AuditsInspectorIssueCodeDeprecationIssue AuditsInspectorIssueCode = "DeprecationIssue" + + // AuditsInspectorIssueCodeClientHintIssue enum const + AuditsInspectorIssueCodeClientHintIssue AuditsInspectorIssueCode = "ClientHintIssue" ) // AuditsInspectorIssueDetails This struct holds a list of optional fields with additional information @@ -760,6 +788,9 @@ type AuditsInspectorIssueDetails struct { // DeprecationIssueDetails (optional) ... DeprecationIssueDetails *AuditsDeprecationIssueDetails `json:"deprecationIssueDetails,omitempty"` + + // ClientHintIssueDetails (optional) ... + ClientHintIssueDetails *AuditsClientHintIssueDetails `json:"clientHintIssueDetails,omitempty"` } // AuditsIssueID A unique id for a DevTools inspector issue. Allows other entities (e.g. diff --git a/lib/proto/debugger.go b/lib/proto/debugger.go index 0b189b44..f4d0e4fd 100644 --- a/lib/proto/debugger.go +++ b/lib/proto/debugger.go @@ -72,7 +72,9 @@ type DebuggerCallFrame struct { // Location Location in the source code. Location *DebuggerLocation `json:"location"` - // URL JavaScript script name or url. + // URL (deprecated) JavaScript script name or url. + // Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously + // sent `Debugger.scriptParsed` event. URL string `json:"url"` // ScopeChain Scope chain for this call frame. diff --git a/lib/proto/definitions.go b/lib/proto/definitions.go index b0ad2032..6d381879 100644 --- a/lib/proto/definitions.go +++ b/lib/proto/definitions.go @@ -71,6 +71,7 @@ var types = map[string]reflect.Type{ "Audits.WasmCrossOriginModuleSharingIssueDetails": reflect.TypeOf(AuditsWasmCrossOriginModuleSharingIssueDetails{}), "Audits.GenericIssueDetails": reflect.TypeOf(AuditsGenericIssueDetails{}), "Audits.DeprecationIssueDetails": reflect.TypeOf(AuditsDeprecationIssueDetails{}), + "Audits.ClientHintIssueDetails": reflect.TypeOf(AuditsClientHintIssueDetails{}), "Audits.InspectorIssueDetails": reflect.TypeOf(AuditsInspectorIssueDetails{}), "Audits.InspectorIssue": reflect.TypeOf(AuditsInspectorIssue{}), "Audits.getEncodedResponse": reflect.TypeOf(AuditsGetEncodedResponse{}), @@ -673,11 +674,13 @@ var types = map[string]reflect.Type{ "Page.VisualViewport": reflect.TypeOf(PageVisualViewport{}), "Page.Viewport": reflect.TypeOf(PageViewport{}), "Page.FontFamilies": reflect.TypeOf(PageFontFamilies{}), + "Page.ScriptFontFamilies": reflect.TypeOf(PageScriptFontFamilies{}), "Page.FontSizes": reflect.TypeOf(PageFontSizes{}), "Page.InstallabilityErrorArgument": reflect.TypeOf(PageInstallabilityErrorArgument{}), "Page.InstallabilityError": reflect.TypeOf(PageInstallabilityError{}), "Page.CompilationCacheParams": reflect.TypeOf(PageCompilationCacheParams{}), "Page.BackForwardCacheNotRestoredExplanation": reflect.TypeOf(PageBackForwardCacheNotRestoredExplanation{}), + "Page.BackForwardCacheNotRestoredExplanationTree": reflect.TypeOf(PageBackForwardCacheNotRestoredExplanationTree{}), "Page.addScriptToEvaluateOnLoad": reflect.TypeOf(PageAddScriptToEvaluateOnLoad{}), "Page.addScriptToEvaluateOnLoadResult": reflect.TypeOf(PageAddScriptToEvaluateOnLoadResult{}), "Page.addScriptToEvaluateOnNewDocument": reflect.TypeOf(PageAddScriptToEvaluateOnNewDocument{}), @@ -829,6 +832,8 @@ var types = map[string]reflect.Type{ "ServiceWorker.workerVersionUpdated": reflect.TypeOf(ServiceWorkerWorkerVersionUpdated{}), "Storage.UsageForType": reflect.TypeOf(StorageUsageForType{}), "Storage.TrustTokens": reflect.TypeOf(StorageTrustTokens{}), + "Storage.InterestGroupAd": reflect.TypeOf(StorageInterestGroupAd{}), + "Storage.InterestGroupDetails": reflect.TypeOf(StorageInterestGroupDetails{}), "Storage.clearDataForOrigin": reflect.TypeOf(StorageClearDataForOrigin{}), "Storage.getCookies": reflect.TypeOf(StorageGetCookies{}), "Storage.getCookiesResult": reflect.TypeOf(StorageGetCookiesResult{}), @@ -845,10 +850,14 @@ var types = map[string]reflect.Type{ "Storage.getTrustTokensResult": reflect.TypeOf(StorageGetTrustTokensResult{}), "Storage.clearTrustTokens": reflect.TypeOf(StorageClearTrustTokens{}), "Storage.clearTrustTokensResult": reflect.TypeOf(StorageClearTrustTokensResult{}), + "Storage.getInterestGroupDetails": reflect.TypeOf(StorageGetInterestGroupDetails{}), + "Storage.getInterestGroupDetailsResult": reflect.TypeOf(StorageGetInterestGroupDetailsResult{}), + "Storage.setInterestGroupTracking": reflect.TypeOf(StorageSetInterestGroupTracking{}), "Storage.cacheStorageContentUpdated": reflect.TypeOf(StorageCacheStorageContentUpdated{}), "Storage.cacheStorageListUpdated": reflect.TypeOf(StorageCacheStorageListUpdated{}), "Storage.indexedDBContentUpdated": reflect.TypeOf(StorageIndexedDBContentUpdated{}), "Storage.indexedDBListUpdated": reflect.TypeOf(StorageIndexedDBListUpdated{}), + "Storage.interestGroupAccessed": reflect.TypeOf(StorageInterestGroupAccessed{}), "SystemInfo.GPUDevice": reflect.TypeOf(SystemInfoGPUDevice{}), "SystemInfo.Size": reflect.TypeOf(SystemInfoSize{}), "SystemInfo.VideoDecodeAcceleratorCapability": reflect.TypeOf(SystemInfoVideoDecodeAcceleratorCapability{}), @@ -1134,6 +1143,8 @@ var types = map[string]reflect.Type{ "Runtime.terminateExecution": reflect.TypeOf(RuntimeTerminateExecution{}), "Runtime.addBinding": reflect.TypeOf(RuntimeAddBinding{}), "Runtime.removeBinding": reflect.TypeOf(RuntimeRemoveBinding{}), + "Runtime.getExceptionDetails": reflect.TypeOf(RuntimeGetExceptionDetails{}), + "Runtime.getExceptionDetailsResult": reflect.TypeOf(RuntimeGetExceptionDetailsResult{}), "Runtime.bindingCalled": reflect.TypeOf(RuntimeBindingCalled{}), "Runtime.consoleAPICalled": reflect.TypeOf(RuntimeConsoleAPICalled{}), "Runtime.exceptionRevoked": reflect.TypeOf(RuntimeExceptionRevoked{}), diff --git a/lib/proto/definitions_test.go b/lib/proto/definitions_test.go index 0fc76276..563f76d2 100644 --- a/lib/proto/definitions_test.go +++ b/lib/proto/definitions_test.go @@ -2911,6 +2911,18 @@ func (t T) StorageClearTrustTokens() { t.Nil(err) } +func (t T) StorageGetInterestGroupDetails() { + c := &Client{} + _, err := proto.StorageGetInterestGroupDetails{}.Call(c) + t.Nil(err) +} + +func (t T) StorageSetInterestGroupTracking() { + c := &Client{} + err := proto.StorageSetInterestGroupTracking{}.Call(c) + t.Nil(err) +} + func (t T) StorageCacheStorageContentUpdated() { e := proto.StorageCacheStorageContentUpdated{} e.ProtoEvent() @@ -2931,6 +2943,11 @@ func (t T) StorageIndexedDBListUpdated() { e.ProtoEvent() } +func (t T) StorageInterestGroupAccessed() { + e := proto.StorageInterestGroupAccessed{} + e.ProtoEvent() +} + func (t T) SystemInfoGetInfo() { c := &Client{} _, err := proto.SystemInfoGetInfo{}.Call(c) @@ -3936,6 +3953,12 @@ func (t T) RuntimeRemoveBinding() { t.Nil(err) } +func (t T) RuntimeGetExceptionDetails() { + c := &Client{} + _, err := proto.RuntimeGetExceptionDetails{}.Call(c) + t.Nil(err) +} + func (t T) RuntimeBindingCalled() { e := proto.RuntimeBindingCalled{} e.ProtoEvent() diff --git a/lib/proto/dom.go b/lib/proto/dom.go index 07a0b7f5..0bf1ca97 100644 --- a/lib/proto/dom.go +++ b/lib/proto/dom.go @@ -103,6 +103,18 @@ const ( // DOMPseudoTypeInputListButton enum const DOMPseudoTypeInputListButton DOMPseudoType = "input-list-button" + + // DOMPseudoTypeTransition enum const + DOMPseudoTypeTransition DOMPseudoType = "transition" + + // DOMPseudoTypeTransitionContainer enum const + DOMPseudoTypeTransitionContainer DOMPseudoType = "transition-container" + + // DOMPseudoTypeTransitionOldContent enum const + DOMPseudoTypeTransitionOldContent DOMPseudoType = "transition-old-content" + + // DOMPseudoTypeTransitionNewContent enum const + DOMPseudoTypeTransitionNewContent DOMPseudoType = "transition-new-content" ) // DOMShadowRootType Shadow root type. diff --git a/lib/proto/overlay.go b/lib/proto/overlay.go index bf2503ae..a8f80532 100644 --- a/lib/proto/overlay.go +++ b/lib/proto/overlay.go @@ -817,7 +817,7 @@ func (m OverlaySetShowScrollBottleneckRects) Call(c Client) error { return call(m.ProtoReq(), m, nil, c) } -// OverlaySetShowHitTestBorders Requests that backend shows hit-test borders on layers +// OverlaySetShowHitTestBorders (deprecated) Deprecated, no longer has any effect. type OverlaySetShowHitTestBorders struct { // Show True for showing hit-test borders diff --git a/lib/proto/page.go b/lib/proto/page.go index 71dbc8d8..3a5db4f1 100644 --- a/lib/proto/page.go +++ b/lib/proto/page.go @@ -303,6 +303,9 @@ const ( // PagePermissionsPolicyBlockReasonIframeAttribute enum const PagePermissionsPolicyBlockReasonIframeAttribute PagePermissionsPolicyBlockReason = "IframeAttribute" + + // PagePermissionsPolicyBlockReasonInFencedFrameTree enum const + PagePermissionsPolicyBlockReasonInFencedFrameTree PagePermissionsPolicyBlockReason = "InFencedFrameTree" ) // PagePermissionsPolicyBlockLocator (experimental) ... @@ -763,6 +766,16 @@ type PageFontFamilies struct { Pictograph string `json:"pictograph,omitempty"` } +// PageScriptFontFamilies (experimental) Font families collection for a script. +type PageScriptFontFamilies struct { + + // Script Name of the script which these font families are defined for. + Script string `json:"script"` + + // FontFamilies Generic font families collection for the script. + FontFamilies *PageFontFamilies `json:"fontFamilies"` +} + // PageFontSizes (experimental) Default font sizes. type PageFontSizes struct { @@ -1288,6 +1301,19 @@ type PageBackForwardCacheNotRestoredExplanation struct { Reason PageBackForwardCacheNotRestoredReason `json:"reason"` } +// PageBackForwardCacheNotRestoredExplanationTree (experimental) ... +type PageBackForwardCacheNotRestoredExplanationTree struct { + + // URL URL of each frame + URL string `json:"url"` + + // Explanations Not restored reasons of each frame + Explanations []*PageBackForwardCacheNotRestoredExplanation `json:"explanations"` + + // Children Array of children frame + Children []*PageBackForwardCacheNotRestoredExplanationTree `json:"children"` +} + // PageAddScriptToEvaluateOnLoad (deprecated) (experimental) Deprecated, please use addScriptToEvaluateOnNewDocument instead. type PageAddScriptToEvaluateOnLoad struct { @@ -2230,6 +2256,9 @@ type PageSetFontFamilies struct { // FontFamilies Specifies font families to set. If a font family is not specified, it won't be changed. FontFamilies *PageFontFamilies `json:"fontFamilies"` + + // ForScripts (optional) Specifies font families to set for individual scripts. + ForScripts []*PageScriptFontFamilies `json:"forScripts,omitempty"` } // ProtoReq name @@ -3006,6 +3035,9 @@ type PageBackForwardCacheNotUsed struct { // NotRestoredExplanations Array of reasons why the page could not be cached. This must not be empty. NotRestoredExplanations []*PageBackForwardCacheNotRestoredExplanation `json:"notRestoredExplanations"` + + // NotRestoredExplanationsTree (optional) Tree structure of reasons why the page could not be cached for each frame. + NotRestoredExplanationsTree *PageBackForwardCacheNotRestoredExplanationTree `json:"notRestoredExplanationsTree,omitempty"` } // ProtoEvent name diff --git a/lib/proto/runtime.go b/lib/proto/runtime.go index 538622e9..eff4aac2 100644 --- a/lib/proto/runtime.go +++ b/lib/proto/runtime.go @@ -1204,6 +1204,37 @@ func (m RuntimeRemoveBinding) Call(c Client) error { return call(m.ProtoReq(), m, nil, c) } +// RuntimeGetExceptionDetails (experimental) This method tries to lookup and populate exception details for a +// JavaScript Error object. +// Note that the stackTrace portion of the resulting exceptionDetails will +// only be populated if the Runtime domain was enabled at the time when the +// Error was thrown. +type RuntimeGetExceptionDetails struct { + + // ErrorObjectID The error object for which to resolve the exception details. + ErrorObjectID RuntimeRemoteObjectID `json:"errorObjectId"` +} + +// ProtoReq name +func (m RuntimeGetExceptionDetails) ProtoReq() string { return "Runtime.getExceptionDetails" } + +// Call the request +func (m RuntimeGetExceptionDetails) Call(c Client) (*RuntimeGetExceptionDetailsResult, error) { + var res RuntimeGetExceptionDetailsResult + return &res, call(m.ProtoReq(), m, &res, c) +} + +// RuntimeGetExceptionDetailsResult (experimental) This method tries to lookup and populate exception details for a +// JavaScript Error object. +// Note that the stackTrace portion of the resulting exceptionDetails will +// only be populated if the Runtime domain was enabled at the time when the +// Error was thrown. +type RuntimeGetExceptionDetailsResult struct { + + // ExceptionDetails (optional) ... + ExceptionDetails *RuntimeExceptionDetails `json:"exceptionDetails,omitempty"` +} + // RuntimeBindingCalled (experimental) Notification is issued every time when binding is called. type RuntimeBindingCalled struct { diff --git a/lib/proto/storage.go b/lib/proto/storage.go index da216946..b097198d 100644 --- a/lib/proto/storage.go +++ b/lib/proto/storage.go @@ -39,6 +39,9 @@ const ( // StorageStorageTypeCacheStorage enum const StorageStorageTypeCacheStorage StorageStorageType = "cache_storage" + // StorageStorageTypeInterestGroups enum const + StorageStorageTypeInterestGroups StorageStorageType = "interest_groups" + // StorageStorageTypeAll enum const StorageStorageTypeAll StorageStorageType = "all" @@ -67,6 +70,76 @@ type StorageTrustTokens struct { Count float64 `json:"count"` } +// StorageInterestGroupAccessType Enum of interest group access types. +type StorageInterestGroupAccessType string + +const ( + // StorageInterestGroupAccessTypeJoin enum const + StorageInterestGroupAccessTypeJoin StorageInterestGroupAccessType = "join" + + // StorageInterestGroupAccessTypeLeave enum const + StorageInterestGroupAccessTypeLeave StorageInterestGroupAccessType = "leave" + + // StorageInterestGroupAccessTypeUpdate enum const + StorageInterestGroupAccessTypeUpdate StorageInterestGroupAccessType = "update" + + // StorageInterestGroupAccessTypeBid enum const + StorageInterestGroupAccessTypeBid StorageInterestGroupAccessType = "bid" + + // StorageInterestGroupAccessTypeWin enum const + StorageInterestGroupAccessTypeWin StorageInterestGroupAccessType = "win" +) + +// StorageInterestGroupAd Ad advertising element inside an interest group. +type StorageInterestGroupAd struct { + + // RenderURL ... + RenderURL string `json:"renderUrl"` + + // Metadata (optional) ... + Metadata string `json:"metadata,omitempty"` +} + +// StorageInterestGroupDetails The full details of an interest group. +type StorageInterestGroupDetails struct { + + // OwnerOrigin ... + OwnerOrigin string `json:"ownerOrigin"` + + // Name ... + Name string `json:"name"` + + // ExpirationTime ... + ExpirationTime float64 `json:"expirationTime"` + + // JoiningOrigin ... + JoiningOrigin string `json:"joiningOrigin"` + + // BiddingURL (optional) ... + BiddingURL string `json:"biddingUrl,omitempty"` + + // BiddingWasmHelperURL (optional) ... + BiddingWasmHelperURL string `json:"biddingWasmHelperUrl,omitempty"` + + // UpdateURL (optional) ... + UpdateURL string `json:"updateUrl,omitempty"` + + // TrustedBiddingSignalsURL (optional) ... + TrustedBiddingSignalsURL string `json:"trustedBiddingSignalsUrl,omitempty"` + + // TrustedBiddingSignalsKeys ... + TrustedBiddingSignalsKeys []string `json:"trustedBiddingSignalsKeys"` + + // UserBiddingSignals (optional) ... + UserBiddingSignals string `json:"userBiddingSignals,omitempty"` + + // Ads ... + Ads []*StorageInterestGroupAd `json:"ads"` + + // AdComponents ... + AdComponents []*StorageInterestGroupAd `json:"adComponents"` +} + // StorageClearDataForOrigin Clears storage for origin. type StorageClearDataForOrigin struct { @@ -310,6 +383,47 @@ type StorageClearTrustTokensResult struct { DidDeleteTokens bool `json:"didDeleteTokens"` } +// StorageGetInterestGroupDetails (experimental) Gets details for a named interest group. +type StorageGetInterestGroupDetails struct { + + // OwnerOrigin ... + OwnerOrigin string `json:"ownerOrigin"` + + // Name ... + Name string `json:"name"` +} + +// ProtoReq name +func (m StorageGetInterestGroupDetails) ProtoReq() string { return "Storage.getInterestGroupDetails" } + +// Call the request +func (m StorageGetInterestGroupDetails) Call(c Client) (*StorageGetInterestGroupDetailsResult, error) { + var res StorageGetInterestGroupDetailsResult + return &res, call(m.ProtoReq(), m, &res, c) +} + +// StorageGetInterestGroupDetailsResult (experimental) Gets details for a named interest group. +type StorageGetInterestGroupDetailsResult struct { + + // Details ... + Details *StorageInterestGroupDetails `json:"details"` +} + +// StorageSetInterestGroupTracking (experimental) Enables/Disables issuing of interestGroupAccessed events. +type StorageSetInterestGroupTracking struct { + + // Enable ... + Enable bool `json:"enable"` +} + +// ProtoReq name +func (m StorageSetInterestGroupTracking) ProtoReq() string { return "Storage.setInterestGroupTracking" } + +// Call sends the request +func (m StorageSetInterestGroupTracking) Call(c Client) error { + return call(m.ProtoReq(), m, nil, c) +} + // StorageCacheStorageContentUpdated A cache's contents have been modified. type StorageCacheStorageContentUpdated struct { @@ -366,3 +480,21 @@ type StorageIndexedDBListUpdated struct { func (evt StorageIndexedDBListUpdated) ProtoEvent() string { return "Storage.indexedDBListUpdated" } + +// StorageInterestGroupAccessed One of the interest groups was accessed by the associated page. +type StorageInterestGroupAccessed struct { + + // Type ... + Type StorageInterestGroupAccessType `json:"type"` + + // OwnerOrigin ... + OwnerOrigin string `json:"ownerOrigin"` + + // Name ... + Name string `json:"name"` +} + +// ProtoEvent name +func (evt StorageInterestGroupAccessed) ProtoEvent() string { + return "Storage.interestGroupAccessed" +} diff --git a/lib/proto/web_authn.go b/lib/proto/web_authn.go index a393dc79..3b6c9fa3 100644 --- a/lib/proto/web_authn.go +++ b/lib/proto/web_authn.go @@ -84,6 +84,11 @@ type WebAuthnVirtualAuthenticatorOptions struct { // Defaults to false. HasCredBlob bool `json:"hasCredBlob,omitempty"` + // HasMinPinLength (optional) If set to true, the authenticator will support the minPinLength extension. + // https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension + // Defaults to false. + HasMinPinLength bool `json:"hasMinPinLength,omitempty"` + // AutomaticPresenceSimulation (optional) If set to true, tests of user presence will succeed immediately. // Otherwise, they will not be resolved. Defaults to true. AutomaticPresenceSimulation bool `json:"automaticPresenceSimulation,omitempty"`