Skip to content

Commit

Permalink
update revision
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Jul 1, 2024
1 parent 0c7bc12 commit 5098fbe
Show file tree
Hide file tree
Showing 12 changed files with 329 additions and 23 deletions.
4 changes: 2 additions & 2 deletions lib/launcher/revision.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package launcher

// RevisionDefault for chromium.
const RevisionDefault = 1294824
const RevisionDefault = 1321438

// RevisionPlaywright for arm linux.
const RevisionPlaywright = 1112
const RevisionPlaywright = 1124
3 changes: 3 additions & 0 deletions lib/proto/accessibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ const (

// AccessibilityAXPropertyNameOwns enum const.
AccessibilityAXPropertyNameOwns AccessibilityAXPropertyName = "owns"

// AccessibilityAXPropertyNameURL enum const.
AccessibilityAXPropertyNameURL AccessibilityAXPropertyName = "url"
)

// AccessibilityAXNode A node in the accessibility tree.
Expand Down
30 changes: 30 additions & 0 deletions lib/proto/audits.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,12 @@ const (
// AuditsBlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep enum const.
AuditsBlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep AuditsBlockedByResponseReason = "CorpNotSameOriginAfterDefaultedToSameOriginByCoep"

// AuditsBlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip enum const.
AuditsBlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip AuditsBlockedByResponseReason = "CorpNotSameOriginAfterDefaultedToSameOriginByDip"

// AuditsBlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip enum const.
AuditsBlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip AuditsBlockedByResponseReason = "CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip"

// AuditsBlockedByResponseReasonCorpNotSameSite enum const.
AuditsBlockedByResponseReasonCorpNotSameSite AuditsBlockedByResponseReason = "CorpNotSameSite"
)
Expand Down Expand Up @@ -778,6 +784,15 @@ type AuditsBounceTrackingIssueDetails struct {
type AuditsCookieDeprecationMetadataIssueDetails struct {
// AllowedSites ...
AllowedSites []string `json:"allowedSites"`

// OptOutPercentage ...
OptOutPercentage float64 `json:"optOutPercentage"`

// IsOptOutTopLevel ...
IsOptOutTopLevel bool `json:"isOptOutTopLevel"`

// Operation ...
Operation AuditsCookieOperation `json:"operation"`
}

// AuditsClientHintIssueReason ...
Expand Down Expand Up @@ -855,9 +870,15 @@ const (
// AuditsFederatedAuthRequestIssueReasonClientMetadataInvalidContentType enum const.
AuditsFederatedAuthRequestIssueReasonClientMetadataInvalidContentType AuditsFederatedAuthRequestIssueReason = "ClientMetadataInvalidContentType"

// AuditsFederatedAuthRequestIssueReasonIdpNotPotentiallyTrustworthy enum const.
AuditsFederatedAuthRequestIssueReasonIdpNotPotentiallyTrustworthy AuditsFederatedAuthRequestIssueReason = "IdpNotPotentiallyTrustworthy"

// AuditsFederatedAuthRequestIssueReasonDisabledInSettings enum const.
AuditsFederatedAuthRequestIssueReasonDisabledInSettings AuditsFederatedAuthRequestIssueReason = "DisabledInSettings"

// AuditsFederatedAuthRequestIssueReasonDisabledInFlags enum const.
AuditsFederatedAuthRequestIssueReasonDisabledInFlags AuditsFederatedAuthRequestIssueReason = "DisabledInFlags"

// AuditsFederatedAuthRequestIssueReasonErrorFetchingSignin enum const.
AuditsFederatedAuthRequestIssueReasonErrorFetchingSignin AuditsFederatedAuthRequestIssueReason = "ErrorFetchingSignin"

Expand Down Expand Up @@ -923,6 +944,15 @@ const (

// AuditsFederatedAuthRequestIssueReasonReplacedByButtonMode enum const.
AuditsFederatedAuthRequestIssueReasonReplacedByButtonMode AuditsFederatedAuthRequestIssueReason = "ReplacedByButtonMode"

// AuditsFederatedAuthRequestIssueReasonInvalidFieldsSpecified enum const.
AuditsFederatedAuthRequestIssueReasonInvalidFieldsSpecified AuditsFederatedAuthRequestIssueReason = "InvalidFieldsSpecified"

// AuditsFederatedAuthRequestIssueReasonRelyingPartyOriginIsOpaque enum const.
AuditsFederatedAuthRequestIssueReasonRelyingPartyOriginIsOpaque AuditsFederatedAuthRequestIssueReason = "RelyingPartyOriginIsOpaque"

// AuditsFederatedAuthRequestIssueReasonTypeNotMatching enum const.
AuditsFederatedAuthRequestIssueReasonTypeNotMatching AuditsFederatedAuthRequestIssueReason = "TypeNotMatching"
)

// AuditsFederatedAuthUserInfoRequestIssueDetails ...
Expand Down
3 changes: 3 additions & 0 deletions lib/proto/browser.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ type BrowserPermissionDescriptor struct {
// AllowWithoutSanitization (optional) For "clipboard" permission, may specify allowWithoutSanitization.
AllowWithoutSanitization bool `json:"allowWithoutSanitization,omitempty"`

// AllowWithoutGesture (optional) For "fullscreen" permission, must specify allowWithoutGesture:true.
AllowWithoutGesture bool `json:"allowWithoutGesture,omitempty"`

// PanTiltZoom (optional) For "camera" permission, may specify panTiltZoom.
PanTiltZoom bool `json:"panTiltZoom,omitempty"`
}
Expand Down
10 changes: 10 additions & 0 deletions lib/proto/definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ var types = map[string]reflect.Type{
"DOM.getContainerForNodeResult": reflect.TypeOf(DOMGetContainerForNodeResult{}),
"DOM.getQueryingDescendantsForContainer": reflect.TypeOf(DOMGetQueryingDescendantsForContainer{}),
"DOM.getQueryingDescendantsForContainerResult": reflect.TypeOf(DOMGetQueryingDescendantsForContainerResult{}),
"DOM.getAnchorElement": reflect.TypeOf(DOMGetAnchorElement{}),
"DOM.getAnchorElementResult": reflect.TypeOf(DOMGetAnchorElementResult{}),
"DOM.attributeModified": reflect.TypeOf(DOMAttributeModified{}),
"DOM.attributeRemoved": reflect.TypeOf(DOMAttributeRemoved{}),
"DOM.characterDataModified": reflect.TypeOf(DOMCharacterDataModified{}),
Expand Down Expand Up @@ -574,6 +576,7 @@ var types = map[string]reflect.Type{
"Network.WebSocketFrame": reflect.TypeOf(NetworkWebSocketFrame{}),
"Network.CachedResource": reflect.TypeOf(NetworkCachedResource{}),
"Network.Initiator": reflect.TypeOf(NetworkInitiator{}),
"Network.CookiePartitionKey": reflect.TypeOf(NetworkCookiePartitionKey{}),
"Network.Cookie": reflect.TypeOf(NetworkCookie{}),
"Network.BlockedSetCookieWithReason": reflect.TypeOf(NetworkBlockedSetCookieWithReason{}),
"Network.ExemptedSetCookieWithReason": reflect.TypeOf(NetworkExemptedSetCookieWithReason{}),
Expand Down Expand Up @@ -669,6 +672,7 @@ var types = map[string]reflect.Type{
"Network.responseReceivedExtraInfo": reflect.TypeOf(NetworkResponseReceivedExtraInfo{}),
"Network.responseReceivedEarlyHints": reflect.TypeOf(NetworkResponseReceivedEarlyHints{}),
"Network.trustTokenOperationDone": reflect.TypeOf(NetworkTrustTokenOperationDone{}),
"Network.policyUpdated": reflect.TypeOf(NetworkPolicyUpdated{}),
"Network.subresourceWebBundleMetadataReceived": reflect.TypeOf(NetworkSubresourceWebBundleMetadataReceived{}),
"Network.subresourceWebBundleMetadataError": reflect.TypeOf(NetworkSubresourceWebBundleMetadataError{}),
"Network.subresourceWebBundleInnerResponseParsed": reflect.TypeOf(NetworkSubresourceWebBundleInnerResponseParsed{}),
Expand Down Expand Up @@ -1166,6 +1170,12 @@ var types = map[string]reflect.Type{
"PWA.getOsAppStateResult": reflect.TypeOf(PWAGetOsAppStateResult{}),
"PWA.install": reflect.TypeOf(PWAInstall{}),
"PWA.uninstall": reflect.TypeOf(PWAUninstall{}),
"PWA.launch": reflect.TypeOf(PWALaunch{}),
"PWA.launchResult": reflect.TypeOf(PWALaunchResult{}),
"PWA.launchFilesInApp": reflect.TypeOf(PWALaunchFilesInApp{}),
"PWA.launchFilesInAppResult": reflect.TypeOf(PWALaunchFilesInAppResult{}),
"PWA.openCurrentPageInApp": reflect.TypeOf(PWAOpenCurrentPageInApp{}),
"PWA.changeAppUserSettings": reflect.TypeOf(PWAChangeAppUserSettings{}),
"Console.ConsoleMessage": reflect.TypeOf(ConsoleConsoleMessage{}),
"Console.clearMessages": reflect.TypeOf(ConsoleClearMessages{}),
"Console.disable": reflect.TypeOf(ConsoleDisable{}),
Expand Down
35 changes: 35 additions & 0 deletions lib/proto/definitions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,12 @@ func (t T) DOMGetQueryingDescendantsForContainer() {
t.Nil(err)
}

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

func (t T) DOMAttributeModified() {
e := proto.DOMAttributeModified{}
t.Regex("", e.ProtoEvent())
Expand Down Expand Up @@ -2119,6 +2125,11 @@ func (t T) NetworkTrustTokenOperationDone() {
t.Regex("", e.ProtoEvent())
}

func (t T) NetworkPolicyUpdated() {
e := proto.NetworkPolicyUpdated{}
t.Regex("", e.ProtoEvent())
}

func (t T) NetworkSubresourceWebBundleMetadataReceived() {
e := proto.NetworkSubresourceWebBundleMetadataReceived{}
t.Regex("", e.ProtoEvent())
Expand Down Expand Up @@ -3916,6 +3927,30 @@ func (t T) PWAUninstall() {
t.Nil(err)
}

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

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

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

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

func (t T) ConsoleClearMessages() {
c := &Client{}
err := proto.ConsoleClearMessages{}.Call(c)
Expand Down
35 changes: 33 additions & 2 deletions lib/proto/dom.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ const (
// DOMPseudoTypeSelection enum const.
DOMPseudoTypeSelection DOMPseudoType = "selection"

// DOMPseudoTypeSearchText enum const.
DOMPseudoTypeSearchText DOMPseudoType = "search-text"

// DOMPseudoTypeTargetText enum const.
DOMPseudoTypeTargetText DOMPseudoType = "target-text"

Expand All @@ -82,8 +85,8 @@ const (
// DOMPseudoTypeScrollMarker enum const.
DOMPseudoTypeScrollMarker DOMPseudoType = "scroll-marker"

// DOMPseudoTypeScrollMarkers enum const.
DOMPseudoTypeScrollMarkers DOMPseudoType = "scroll-markers"
// DOMPseudoTypeScrollMarkerGroup enum const.
DOMPseudoTypeScrollMarkerGroup DOMPseudoType = "scroll-marker-group"

// DOMPseudoTypeScrollbar enum const.
DOMPseudoTypeScrollbar DOMPseudoType = "scrollbar"
Expand Down Expand Up @@ -1478,6 +1481,34 @@ type DOMGetQueryingDescendantsForContainerResult struct {
NodeIDs []DOMNodeID `json:"nodeIds"`
}

// DOMGetAnchorElement (experimental) Returns the target anchor element of the given anchor query according to
// https://www.w3.org/TR/css-anchor-position-1/#target.
type DOMGetAnchorElement struct {
// NodeID Id of the positioned element from which to find the anchor.
NodeID DOMNodeID `json:"nodeId"`

// AnchorSpecifier (optional) An optional anchor specifier, as defined in
// https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.
// If not provided, it will return the implicit anchor element for
// the given positioned element.
AnchorSpecifier string `json:"anchorSpecifier,omitempty"`
}

// ProtoReq name.
func (m DOMGetAnchorElement) ProtoReq() string { return "DOM.getAnchorElement" }

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

// DOMGetAnchorElementResult (experimental) ...
type DOMGetAnchorElementResult struct {
// NodeID The anchor element of the given anchor query.
NodeID DOMNodeID `json:"nodeId"`
}

// DOMAttributeModified Fired when `Element`'s attribute is modified.
type DOMAttributeModified struct {
// NodeID Id of the node that has changed.
Expand Down
68 changes: 50 additions & 18 deletions lib/proto/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ type NetworkResourceTiming struct {
// WorkerRespondWithSettled (experimental) Settled fetch event respondWith promise.
WorkerRespondWithSettled float64 `json:"workerRespondWithSettled"`

// WorkerRouterEvaluationStart (experimental) (optional) Started ServiceWorker static routing source evaluation.
WorkerRouterEvaluationStart *float64 `json:"workerRouterEvaluationStart,omitempty"`

// WorkerCacheLookupStart (experimental) (optional) Started cache lookup when the source was evaluated to `cache`.
WorkerCacheLookupStart *float64 `json:"workerCacheLookupStart,omitempty"`

// SendStart Started sending request.
SendStart float64 `json:"sendStart"`

Expand Down Expand Up @@ -501,6 +507,12 @@ const (
// NetworkBlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep enum const.
NetworkBlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep NetworkBlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep"

// NetworkBlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip enum const.
NetworkBlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByDip NetworkBlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-dip"

// NetworkBlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip enum const.
NetworkBlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip NetworkBlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip"

// NetworkBlockedReasonCorpNotSameSite enum const.
NetworkBlockedReasonCorpNotSameSite NetworkBlockedReason = "corp-not-same-site"
)
Expand Down Expand Up @@ -734,6 +746,9 @@ type NetworkServiceWorkerRouterInfo struct {
// MatchedSourceType (optional) The router source of the matched rule. If there is a matched rule, this
// field will be set, otherwise no value will be set.
MatchedSourceType NetworkServiceWorkerRouterSource `json:"matchedSourceType,omitempty"`

// ActualSourceType (optional) The actual router source used.
ActualSourceType NetworkServiceWorkerRouterSource `json:"actualSourceType,omitempty"`
}

// NetworkResponse HTTP response data.
Expand Down Expand Up @@ -925,6 +940,17 @@ type NetworkInitiator struct {
RequestID NetworkRequestID `json:"requestId,omitempty"`
}

// NetworkCookiePartitionKey (experimental) cookiePartitionKey object
// The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h.
type NetworkCookiePartitionKey struct {
// TopLevelSite The site of the top-level URL the browser was visiting at the start
// of the request to the endpoint that set the cookie.
TopLevelSite string `json:"topLevelSite"`

// HasCrossSiteAncestor Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.
HasCrossSiteAncestor bool `json:"hasCrossSiteAncestor"`
}

// NetworkCookie Cookie object.
type NetworkCookie struct {
// Name Cookie name.
Expand Down Expand Up @@ -971,9 +997,8 @@ type NetworkCookie struct {
// This is a temporary ability and it will be removed in the future.
SourcePort int `json:"sourcePort"`

// PartitionKey (experimental) (optional) Cookie partition key. The site of the top-level URL the browser was visiting at the start
// of the request to the endpoint that set the cookie.
PartitionKey string `json:"partitionKey,omitempty"`
// PartitionKey (experimental) (optional) Cookie partition key.
PartitionKey *NetworkCookiePartitionKey `json:"partitionKey,omitempty"`

// PartitionKeyOpaque (experimental) (optional) True if cookie partition key is opaque.
PartitionKeyOpaque bool `json:"partitionKeyOpaque,omitempty"`
Expand Down Expand Up @@ -1133,6 +1158,9 @@ const (

// NetworkCookieExemptionReasonCorsOptIn enum const.
NetworkCookieExemptionReasonCorsOptIn NetworkCookieExemptionReason = "CorsOptIn"

// NetworkCookieExemptionReasonScheme enum const.
NetworkCookieExemptionReasonScheme NetworkCookieExemptionReason = "Scheme"
)

// NetworkBlockedSetCookieWithReason (experimental) A cookie which was not stored from a response with the corresponding reason.
Expand Down Expand Up @@ -1221,10 +1249,8 @@ type NetworkCookieParam struct {
// This is a temporary ability and it will be removed in the future.
SourcePort *int `json:"sourcePort,omitempty"`

// PartitionKey (experimental) (optional) Cookie partition key. The site of the top-level URL the browser was visiting at the start
// of the request to the endpoint that set the cookie.
// If not set, the cookie will be set as not partitioned.
PartitionKey string `json:"partitionKey,omitempty"`
// PartitionKey (experimental) (optional) Cookie partition key. If not set, the cookie will be set as not partitioned.
PartitionKey *NetworkCookiePartitionKey `json:"partitionKey,omitempty"`
}

// NetworkAuthChallengeSource enum.
Expand Down Expand Up @@ -1841,9 +1867,9 @@ type NetworkDeleteCookies struct {
// Path (optional) If specified, deletes only cookies with the exact path.
Path string `json:"path,omitempty"`

// PartitionKey (optional) If specified, deletes only cookies with the the given name and partitionKey where domain
// matches provided URL.
PartitionKey string `json:"partitionKey,omitempty"`
// PartitionKey (experimental) (optional) If specified, deletes only cookies with the the given name and partitionKey where
// all partition key attributes match the cookie partition key attribute.
PartitionKey *NetworkCookiePartitionKey `json:"partitionKey,omitempty"`
}

// ProtoReq name.
Expand Down Expand Up @@ -2214,10 +2240,8 @@ type NetworkSetCookie struct {
// This is a temporary ability and it will be removed in the future.
SourcePort *int `json:"sourcePort,omitempty"`

// PartitionKey (experimental) (optional) Cookie partition key. The site of the top-level URL the browser was visiting at the start
// of the request to the endpoint that set the cookie.
// If not set, the cookie will be set as not partitioned.
PartitionKey string `json:"partitionKey,omitempty"`
// PartitionKey (experimental) (optional) Cookie partition key. If not set, the cookie will be set as not partitioned.
PartitionKey *NetworkCookiePartitionKey `json:"partitionKey,omitempty"`
}

// ProtoReq name.
Expand Down Expand Up @@ -2893,9 +2917,9 @@ type NetworkResponseReceivedExtraInfo struct {
// available, such as in the case of HTTP/2 or QUIC.
HeadersText string `json:"headersText,omitempty"`

// CookiePartitionKey (optional) The cookie partition key that will be used to store partitioned cookies set in this response.
// CookiePartitionKey (experimental) (optional) The cookie partition key that will be used to store partitioned cookies set in this response.
// Only sent when partitioned cookies are enabled.
CookiePartitionKey string `json:"cookiePartitionKey,omitempty"`
CookiePartitionKey *NetworkCookiePartitionKey `json:"cookiePartitionKey,omitempty"`

// CookiePartitionKeyOpaque (optional) True if partitioned cookies are enabled, but the partition key is not serializable to string.
CookiePartitionKeyOpaque bool `json:"cookiePartitionKeyOpaque,omitempty"`
Expand Down Expand Up @@ -2948,8 +2972,8 @@ const (
// NetworkTrustTokenOperationDoneStatusAlreadyExists enum const.
NetworkTrustTokenOperationDoneStatusAlreadyExists NetworkTrustTokenOperationDoneStatus = "AlreadyExists"

// NetworkTrustTokenOperationDoneStatusUnavailable enum const.
NetworkTrustTokenOperationDoneStatusUnavailable NetworkTrustTokenOperationDoneStatus = "Unavailable"
// NetworkTrustTokenOperationDoneStatusResourceLimited enum const.
NetworkTrustTokenOperationDoneStatusResourceLimited NetworkTrustTokenOperationDoneStatus = "ResourceLimited"

// NetworkTrustTokenOperationDoneStatusUnauthorized enum const.
NetworkTrustTokenOperationDoneStatusUnauthorized NetworkTrustTokenOperationDoneStatus = "Unauthorized"
Expand Down Expand Up @@ -2999,6 +3023,14 @@ func (evt NetworkTrustTokenOperationDone) ProtoEvent() string {
return "Network.trustTokenOperationDone"
}

// NetworkPolicyUpdated (experimental) Fired once security policy has been updated.
type NetworkPolicyUpdated struct{}

// ProtoEvent name.
func (evt NetworkPolicyUpdated) ProtoEvent() string {
return "Network.policyUpdated"
}

// NetworkSubresourceWebBundleMetadataReceived (experimental) Fired once when parsing the .wbn file has succeeded.
// The event contains the information about the web bundle contents.
type NetworkSubresourceWebBundleMetadataReceived struct {
Expand Down
Loading

0 comments on commit 5098fbe

Please sign in to comment.