Skip to content

Commit

Permalink
update chromium version
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Aug 5, 2021
1 parent ab8740f commit c00ca2f
Show file tree
Hide file tree
Showing 12 changed files with 683 additions and 36 deletions.
2 changes: 1 addition & 1 deletion lib/launcher/revision.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
package launcher

// DefaultRevision for chrome
const DefaultRevision = 884014
const DefaultRevision = 901912
59 changes: 57 additions & 2 deletions lib/proto/audits.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const (

// AuditsSameSiteCookieExclusionReasonExcludeSameSiteStrict enum const
AuditsSameSiteCookieExclusionReasonExcludeSameSiteStrict AuditsSameSiteCookieExclusionReason = "ExcludeSameSiteStrict"

// AuditsSameSiteCookieExclusionReasonExcludeInvalidSameParty enum const
AuditsSameSiteCookieExclusionReasonExcludeInvalidSameParty AuditsSameSiteCookieExclusionReason = "ExcludeInvalidSameParty"
)

// AuditsSameSiteCookieWarningReason ...
Expand Down Expand Up @@ -102,8 +105,14 @@ const (
// information without the cookie.
type AuditsSameSiteCookieIssueDetails struct {

// Cookie ...
Cookie *AuditsAffectedCookie `json:"cookie"`
// Cookie (optional) If AffectedCookie is not set then rawCookieLine contains the raw
// Set-Cookie header string. This hints at a problem where the
// cookie line is syntactically or semantically malformed in a way
// that no valid cookie could be created.
Cookie *AuditsAffectedCookie `json:"cookie,omitempty"`

// RawCookieLine (optional) ...
RawCookieLine string `json:"rawCookieLine,omitempty"`

// CookieWarningReasons ...
CookieWarningReasons []AuditsSameSiteCookieWarningReason `json:"cookieWarningReasons"`
Expand Down Expand Up @@ -558,6 +567,32 @@ type AuditsQuirksModeIssueDetails struct {
LoaderID NetworkLoaderID `json:"loaderId"`
}

// AuditsNavigatorUserAgentIssueDetails ...
type AuditsNavigatorUserAgentIssueDetails struct {

// URL ...
URL string `json:"url"`

// Location (optional) ...
Location *AuditsSourceCodeLocation `json:"location,omitempty"`
}

// AuditsWasmCrossOriginModuleSharingIssueDetails ...
type AuditsWasmCrossOriginModuleSharingIssueDetails struct {

// WasmModuleURL ...
WasmModuleURL string `json:"wasmModuleUrl"`

// SourceOrigin ...
SourceOrigin string `json:"sourceOrigin"`

// TargetOrigin ...
TargetOrigin string `json:"targetOrigin"`

// IsWarning ...
IsWarning bool `json:"isWarning"`
}

// AuditsInspectorIssueCode 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.
Expand Down Expand Up @@ -596,6 +631,12 @@ const (

// AuditsInspectorIssueCodeQuirksModeIssue enum const
AuditsInspectorIssueCodeQuirksModeIssue AuditsInspectorIssueCode = "QuirksModeIssue"

// AuditsInspectorIssueCodeNavigatorUserAgentIssue enum const
AuditsInspectorIssueCodeNavigatorUserAgentIssue AuditsInspectorIssueCode = "NavigatorUserAgentIssue"

// AuditsInspectorIssueCodeWasmCrossOriginModuleSharingIssue enum const
AuditsInspectorIssueCodeWasmCrossOriginModuleSharingIssue AuditsInspectorIssueCode = "WasmCrossOriginModuleSharingIssue"
)

// AuditsInspectorIssueDetails This struct holds a list of optional fields with additional information
Expand Down Expand Up @@ -635,8 +676,18 @@ type AuditsInspectorIssueDetails struct {

// QuirksModeIssueDetails (optional) ...
QuirksModeIssueDetails *AuditsQuirksModeIssueDetails `json:"quirksModeIssueDetails,omitempty"`

// NavigatorUserAgentIssueDetails (optional) ...
NavigatorUserAgentIssueDetails *AuditsNavigatorUserAgentIssueDetails `json:"navigatorUserAgentIssueDetails,omitempty"`

// WasmCrossOriginModuleSharingIssue (optional) ...
WasmCrossOriginModuleSharingIssue *AuditsWasmCrossOriginModuleSharingIssueDetails `json:"wasmCrossOriginModuleSharingIssue,omitempty"`
}

// AuditsIssueID A unique id for a DevTools inspector issue. Allows other entities (e.g.
// exceptions, CDP message, console messages, etc.) to reference an issue.
type AuditsIssueID string

// AuditsInspectorIssue An inspector issue reported from the back-end.
type AuditsInspectorIssue struct {

Expand All @@ -645,6 +696,10 @@ type AuditsInspectorIssue struct {

// Details ...
Details *AuditsInspectorIssueDetails `json:"details"`

// IssueID (optional) A unique id for this issue. May be omitted if no other entity (e.g.
// exception, CDP message, etc.) is referencing this issue.
IssueID AuditsIssueID `json:"issueId,omitempty"`
}

// AuditsGetEncodedResponseEncoding enum
Expand Down
57 changes: 55 additions & 2 deletions lib/proto/css.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ type CSSCSSStyleSheetHeader struct {
// FrameID Owner frame identifier.
FrameID PageFrameID `json:"frameId"`

// SourceURL Stylesheet resource URL.
// SourceURL Stylesheet resource URL. Empty if this is a constructed stylesheet created using
// new CSSStyleSheet() (but non-empty if this is a constructed sylesheet imported
// as a CSS module script).
SourceURL string `json:"sourceURL"`

// SourceMapURL (optional) URL of source map associated with the stylesheet (if any).
Expand Down Expand Up @@ -127,7 +129,8 @@ type CSSCSSStyleSheetHeader struct {
// Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
IsMutable bool `json:"isMutable"`

// IsConstructed Whether this stylesheet is a constructed stylesheet (created using new CSSStyleSheet()).
// IsConstructed True if this stylesheet is created through new CSSStyleSheet() or imported as a
// CSS module script.
IsConstructed bool `json:"isConstructed"`

// StartLine Line offset of the stylesheet within the resource (zero based).
Expand Down Expand Up @@ -165,6 +168,10 @@ type CSSCSSRule struct {
// Media (optional) Media list array (for rules involving media queries). The array enumerates media queries
// starting with the innermost one, going outwards.
Media []*CSSCSSMedia `json:"media,omitempty"`

// ContainerQueries (experimental) (optional) Container query list array (for rules involving container queries).
// The array enumerates container queries starting with the innermost one, going outwards.
ContainerQueries []*CSSCSSContainerQuery `json:"containerQueries,omitempty"`
}

// CSSRuleUsage CSS coverage information.
Expand Down Expand Up @@ -343,6 +350,23 @@ type CSSMediaQueryExpression struct {
ComputedLength float64 `json:"computedLength,omitempty"`
}

// CSSCSSContainerQuery (experimental) CSS container query rule descriptor.
type CSSCSSContainerQuery struct {

// Text Container query text.
Text string `json:"text"`

// Range (optional) The associated rule header range in the enclosing stylesheet (if
// available).
Range *CSSSourceRange `json:"range,omitempty"`

// StyleSheetID (optional) Identifier of the stylesheet containing this object (if exists).
StyleSheetID CSSStyleSheetID `json:"styleSheetId,omitempty"`

// Name (optional) Optional name for the container.
Name string `json:"name,omitempty"`
}

// CSSPlatformFontUsage Information about amount of glyphs that were rendered with given font.
type CSSPlatformFontUsage struct {

Expand Down Expand Up @@ -881,6 +905,35 @@ type CSSSetMediaTextResult struct {
Media *CSSCSSMedia `json:"media"`
}

// CSSSetContainerQueryText (experimental) Modifies the expression of a container query.
type CSSSetContainerQueryText struct {

// StyleSheetID ...
StyleSheetID CSSStyleSheetID `json:"styleSheetId"`

// Range ...
Range *CSSSourceRange `json:"range"`

// Text ...
Text string `json:"text"`
}

// ProtoReq name
func (m CSSSetContainerQueryText) ProtoReq() string { return "CSS.setContainerQueryText" }

// Call the request
func (m CSSSetContainerQueryText) Call(c Client) (*CSSSetContainerQueryTextResult, error) {
var res CSSSetContainerQueryTextResult
return &res, call(m.ProtoReq(), m, &res, c)
}

// CSSSetContainerQueryTextResult (experimental) Modifies the expression of a container query.
type CSSSetContainerQueryTextResult struct {

// ContainerQuery The resulting CSS container query rule after modification.
ContainerQuery *CSSCSSContainerQuery `json:"containerQuery"`
}

// CSSSetRuleSelector Modifies the rule selector.
type CSSSetRuleSelector struct {

Expand Down
17 changes: 16 additions & 1 deletion lib/proto/definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ var types = map[string]reflect.Type{
"Audits.CorsIssueDetails": reflect.TypeOf(AuditsCorsIssueDetails{}),
"Audits.AttributionReportingIssueDetails": reflect.TypeOf(AuditsAttributionReportingIssueDetails{}),
"Audits.QuirksModeIssueDetails": reflect.TypeOf(AuditsQuirksModeIssueDetails{}),
"Audits.NavigatorUserAgentIssueDetails": reflect.TypeOf(AuditsNavigatorUserAgentIssueDetails{}),
"Audits.WasmCrossOriginModuleSharingIssueDetails": reflect.TypeOf(AuditsWasmCrossOriginModuleSharingIssueDetails{}),
"Audits.InspectorIssueDetails": reflect.TypeOf(AuditsInspectorIssueDetails{}),
"Audits.InspectorIssue": reflect.TypeOf(AuditsInspectorIssue{}),
"Audits.getEncodedResponse": reflect.TypeOf(AuditsGetEncodedResponse{}),
Expand Down Expand Up @@ -134,6 +136,7 @@ var types = map[string]reflect.Type{
"CSS.CSSMedia": reflect.TypeOf(CSSCSSMedia{}),
"CSS.MediaQuery": reflect.TypeOf(CSSMediaQuery{}),
"CSS.MediaQueryExpression": reflect.TypeOf(CSSMediaQueryExpression{}),
"CSS.CSSContainerQuery": reflect.TypeOf(CSSCSSContainerQuery{}),
"CSS.PlatformFontUsage": reflect.TypeOf(CSSPlatformFontUsage{}),
"CSS.FontVariationAxis": reflect.TypeOf(CSSFontVariationAxis{}),
"CSS.FontFace": reflect.TypeOf(CSSFontFace{}),
Expand Down Expand Up @@ -171,6 +174,8 @@ var types = map[string]reflect.Type{
"CSS.setKeyframeKeyResult": reflect.TypeOf(CSSSetKeyframeKeyResult{}),
"CSS.setMediaText": reflect.TypeOf(CSSSetMediaText{}),
"CSS.setMediaTextResult": reflect.TypeOf(CSSSetMediaTextResult{}),
"CSS.setContainerQueryText": reflect.TypeOf(CSSSetContainerQueryText{}),
"CSS.setContainerQueryTextResult": reflect.TypeOf(CSSSetContainerQueryTextResult{}),
"CSS.setRuleSelector": reflect.TypeOf(CSSSetRuleSelector{}),
"CSS.setRuleSelectorResult": reflect.TypeOf(CSSSetRuleSelectorResult{}),
"CSS.setStyleSheetText": reflect.TypeOf(CSSSetStyleSheetText{}),
Expand Down Expand Up @@ -286,6 +291,8 @@ var types = map[string]reflect.Type{
"DOM.undo": reflect.TypeOf(DOMUndo{}),
"DOM.getFrameOwner": reflect.TypeOf(DOMGetFrameOwner{}),
"DOM.getFrameOwnerResult": reflect.TypeOf(DOMGetFrameOwnerResult{}),
"DOM.getContainerForNode": reflect.TypeOf(DOMGetContainerForNode{}),
"DOM.getContainerForNodeResult": reflect.TypeOf(DOMGetContainerForNodeResult{}),
"DOM.attributeModified": reflect.TypeOf(DOMAttributeModified{}),
"DOM.attributeRemoved": reflect.TypeOf(DOMAttributeRemoved{}),
"DOM.characterDataModified": reflect.TypeOf(DOMCharacterDataModified{}),
Expand Down Expand Up @@ -552,7 +559,6 @@ var types = map[string]reflect.Type{
"Network.setCookie": reflect.TypeOf(NetworkSetCookie{}),
"Network.setCookieResult": reflect.TypeOf(NetworkSetCookieResult{}),
"Network.setCookies": reflect.TypeOf(NetworkSetCookies{}),
"Network.setDataSizeLimitsForTest": reflect.TypeOf(NetworkSetDataSizeLimitsForTest{}),
"Network.setExtraHTTPHeaders": reflect.TypeOf(NetworkSetExtraHTTPHeaders{}),
"Network.setAttachDebugStack": reflect.TypeOf(NetworkSetAttachDebugStack{}),
"Network.setRequestInterception": reflect.TypeOf(NetworkSetRequestInterception{}),
Expand Down Expand Up @@ -584,6 +590,10 @@ var types = map[string]reflect.Type{
"Network.requestWillBeSentExtraInfo": reflect.TypeOf(NetworkRequestWillBeSentExtraInfo{}),
"Network.responseReceivedExtraInfo": reflect.TypeOf(NetworkResponseReceivedExtraInfo{}),
"Network.trustTokenOperationDone": reflect.TypeOf(NetworkTrustTokenOperationDone{}),
"Network.subresourceWebBundleMetadataReceived": reflect.TypeOf(NetworkSubresourceWebBundleMetadataReceived{}),
"Network.subresourceWebBundleMetadataError": reflect.TypeOf(NetworkSubresourceWebBundleMetadataError{}),
"Network.subresourceWebBundleInnerResponseParsed": reflect.TypeOf(NetworkSubresourceWebBundleInnerResponseParsed{}),
"Network.subresourceWebBundleInnerResponseError": reflect.TypeOf(NetworkSubresourceWebBundleInnerResponseError{}),
"Overlay.SourceOrderConfig": reflect.TypeOf(OverlaySourceOrderConfig{}),
"Overlay.GridHighlightConfig": reflect.TypeOf(OverlayGridHighlightConfig{}),
"Overlay.FlexContainerHighlightConfig": reflect.TypeOf(OverlayFlexContainerHighlightConfig{}),
Expand All @@ -596,6 +606,8 @@ var types = map[string]reflect.Type{
"Overlay.ScrollSnapContainerHighlightConfig": reflect.TypeOf(OverlayScrollSnapContainerHighlightConfig{}),
"Overlay.ScrollSnapHighlightConfig": reflect.TypeOf(OverlayScrollSnapHighlightConfig{}),
"Overlay.HingeConfig": reflect.TypeOf(OverlayHingeConfig{}),
"Overlay.ContainerQueryHighlightConfig": reflect.TypeOf(OverlayContainerQueryHighlightConfig{}),
"Overlay.ContainerQueryContainerHighlightConfig": reflect.TypeOf(OverlayContainerQueryContainerHighlightConfig{}),
"Overlay.disable": reflect.TypeOf(OverlayDisable{}),
"Overlay.enable": reflect.TypeOf(OverlayEnable{}),
"Overlay.getHighlightObjectForTest": reflect.TypeOf(OverlayGetHighlightObjectForTest{}),
Expand All @@ -618,6 +630,7 @@ var types = map[string]reflect.Type{
"Overlay.setShowGridOverlays": reflect.TypeOf(OverlaySetShowGridOverlays{}),
"Overlay.setShowFlexOverlays": reflect.TypeOf(OverlaySetShowFlexOverlays{}),
"Overlay.setShowScrollSnapOverlays": reflect.TypeOf(OverlaySetShowScrollSnapOverlays{}),
"Overlay.setShowContainerQueryOverlays": reflect.TypeOf(OverlaySetShowContainerQueryOverlays{}),
"Overlay.setShowPaintRects": reflect.TypeOf(OverlaySetShowPaintRects{}),
"Overlay.setShowLayoutShiftRegions": reflect.TypeOf(OverlaySetShowLayoutShiftRegions{}),
"Overlay.setShowScrollBottleneckRects": reflect.TypeOf(OverlaySetShowScrollBottleneckRects{}),
Expand All @@ -629,6 +642,7 @@ var types = map[string]reflect.Type{
"Overlay.nodeHighlightRequested": reflect.TypeOf(OverlayNodeHighlightRequested{}),
"Overlay.screenshotRequested": reflect.TypeOf(OverlayScreenshotRequested{}),
"Overlay.inspectModeCanceled": reflect.TypeOf(OverlayInspectModeCanceled{}),
"Page.AdFrameStatus": reflect.TypeOf(PageAdFrameStatus{}),
"Page.PermissionsPolicyBlockLocator": reflect.TypeOf(PagePermissionsPolicyBlockLocator{}),
"Page.PermissionsPolicyFeatureState": reflect.TypeOf(PagePermissionsPolicyFeatureState{}),
"Page.OriginTrialToken": reflect.TypeOf(PageOriginTrialToken{}),
Expand All @@ -650,6 +664,7 @@ var types = map[string]reflect.Type{
"Page.InstallabilityErrorArgument": reflect.TypeOf(PageInstallabilityErrorArgument{}),
"Page.InstallabilityError": reflect.TypeOf(PageInstallabilityError{}),
"Page.CompilationCacheParams": reflect.TypeOf(PageCompilationCacheParams{}),
"Page.BackForwardCacheNotRestoredExplanation": reflect.TypeOf(PageBackForwardCacheNotRestoredExplanation{}),
"Page.addScriptToEvaluateOnLoad": reflect.TypeOf(PageAddScriptToEvaluateOnLoad{}),
"Page.addScriptToEvaluateOnLoadResult": reflect.TypeOf(PageAddScriptToEvaluateOnLoadResult{}),
"Page.addScriptToEvaluateOnNewDocument": reflect.TypeOf(PageAddScriptToEvaluateOnNewDocument{}),
Expand Down
44 changes: 38 additions & 6 deletions lib/proto/definitions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,12 @@ func (t T) CSSSetMediaText() {
t.Nil(err)
}

func (t T) CSSSetContainerQueryText() {
c := &Client{}
_, err := proto.CSSSetContainerQueryText{}.Call(c)
t.Nil(err)
}

func (t T) CSSSetRuleSelector() {
c := &Client{}
_, err := proto.CSSSetRuleSelector{}.Call(c)
Expand Down Expand Up @@ -847,6 +853,12 @@ func (t T) DOMGetFrameOwner() {
t.Nil(err)
}

func (t T) DOMGetContainerForNode() {
c := &Client{}
_, err := proto.DOMGetContainerForNode{}.Call(c)
t.Nil(err)
}

func (t T) DOMAttributeModified() {
e := proto.DOMAttributeModified{}
e.ProtoEvent()
Expand Down Expand Up @@ -1767,12 +1779,6 @@ func (t T) NetworkSetCookies() {
t.Nil(err)
}

func (t T) NetworkSetDataSizeLimitsForTest() {
c := &Client{}
err := proto.NetworkSetDataSizeLimitsForTest{}.Call(c)
t.Nil(err)
}

func (t T) NetworkSetExtraHTTPHeaders() {
c := &Client{}
err := proto.NetworkSetExtraHTTPHeaders{}.Call(c)
Expand Down Expand Up @@ -1924,6 +1930,26 @@ func (t T) NetworkTrustTokenOperationDone() {
e.ProtoEvent()
}

func (t T) NetworkSubresourceWebBundleMetadataReceived() {
e := proto.NetworkSubresourceWebBundleMetadataReceived{}
e.ProtoEvent()
}

func (t T) NetworkSubresourceWebBundleMetadataError() {
e := proto.NetworkSubresourceWebBundleMetadataError{}
e.ProtoEvent()
}

func (t T) NetworkSubresourceWebBundleInnerResponseParsed() {
e := proto.NetworkSubresourceWebBundleInnerResponseParsed{}
e.ProtoEvent()
}

func (t T) NetworkSubresourceWebBundleInnerResponseError() {
e := proto.NetworkSubresourceWebBundleInnerResponseError{}
e.ProtoEvent()
}

func (t T) OverlayDisable() {
c := &Client{}
err := proto.OverlayDisable{}.Call(c)
Expand Down Expand Up @@ -2038,6 +2064,12 @@ func (t T) OverlaySetShowScrollSnapOverlays() {
t.Nil(err)
}

func (t T) OverlaySetShowContainerQueryOverlays() {
c := &Client{}
err := proto.OverlaySetShowContainerQueryOverlays{}.Call(c)
t.Nil(err)
}

func (t T) OverlaySetShowPaintRects() {
c := &Client{}
err := proto.OverlaySetShowPaintRects{}.Call(c)
Expand Down
Loading

0 comments on commit c00ca2f

Please sign in to comment.